svn commit: samba r19146 - in branches/SAMBA_4_0/source/lib/ldb/ldb_tdb: .

metze at samba.org metze at samba.org
Fri Oct 6 16:17:20 GMT 2006


Author: metze
Date: 2006-10-06 16:17:19 +0000 (Fri, 06 Oct 2006)
New Revision: 19146

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

Log:
merge from samba3:

talloc_reference() can fail

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c	2006-10-06 16:14:41 UTC (rev 19145)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c	2006-10-06 16:17:19 UTC (rev 19146)
@@ -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