summaryrefslogtreecommitdiff
path: root/source3/lib/ldb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/ldb')
-rw-r--r--source3/lib/ldb/ldb_tdb/ldb_tdb_wrap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/lib/ldb/ldb_tdb/ldb_tdb_wrap.c b/source3/lib/ldb/ldb_tdb/ldb_tdb_wrap.c
index b28bf77450..c9eac013fc 100644
--- a/source3/lib/ldb/ldb_tdb/ldb_tdb_wrap.c
+++ b/source3/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;
}
}