From: Stefan Metzmacher Date: Fri, 6 Oct 2006 16:17:19 +0000 (+0000) Subject: r19146: merge from samba3: X-Git-Tag: samba-4.0.0alpha6~801^3~4560 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47f90dde40cf1e31ebc570af315f7fb9f78cd79f;p=thirdparty%2Fsamba.git r19146: merge from samba3: talloc_reference() can fail metze (This used to be commit 542cd5d029e97c2e0c7c006a1ced12114c1bb6da) --- diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb_wrap.c b/source4/lib/ldb/ldb_tdb/ldb_tdb_wrap.c index b28bf774507..c9eac013fcf 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb_wrap.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb_wrap.c @@ -134,7 +134,9 @@ struct tdb_context *ltdb_wrap_open(TALLOC_CTX *mem_ctx, 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; } }