summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-10-06 16:17:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:20:43 -0500
commit47f90dde40cf1e31ebc570af315f7fb9f78cd79f (patch)
tree0eea9c136c4fcca5b0b1c570946e85e977f16130 /source4
parent250399c9230ea972f6bf374fb9951b6cb35320f2 (diff)
downloadsamba-47f90dde40cf1e31ebc570af315f7fb9f78cd79f.tar.gz
samba-47f90dde40cf1e31ebc570af315f7fb9f78cd79f.tar.bz2
samba-47f90dde40cf1e31ebc570af315f7fb9f78cd79f.zip
r19146: merge from samba3:
talloc_reference() can fail metze (This used to be commit 542cd5d029e97c2e0c7c006a1ced12114c1bb6da)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb_wrap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb_wrap.c b/source4/lib/ldb/ldb_tdb/ldb_tdb_wrap.c
index b28bf77450..c9eac013fc 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;
}
}