svn commit: samba r19145 - in branches/SAMBA_3_0/source/lib/ldb/ldb_tdb: .

metze at samba.org metze at samba.org
Fri Oct 6 16:14:41 GMT 2006


Author: metze
Date: 2006-10-06 16:14:41 +0000 (Fri, 06 Oct 2006)
New Revision: 19145

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19145

Log:
talloc_reference() can fail!

metze
Modified:
   branches/SAMBA_3_0/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c
===================================================================
--- branches/SAMBA_3_0/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c	2006-10-06 16:13:25 UTC (rev 19144)
+++ branches/SAMBA_3_0/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c	2006-10-06 16:14:41 UTC (rev 19145)
@@ -134,7 +134,9 @@
 	if (stat(path, &st) == 0) {
 		for (w=tdb_list;w;w=w->next) {
 			if (st.st_dev == w->device && st.st_ino == w->inode) {
-				talloc_reference(mem_ctx, w);
+				if (!talloc_reference(mem_ctx, w)) {
+					return NULL;
+				}
 				return w->tdb;
 			}
 		}



More information about the samba-cvs mailing list