summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/dbwrap/dbwrap_tdb.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/lib/dbwrap/dbwrap_tdb.c b/source3/lib/dbwrap/dbwrap_tdb.c
index aca57b63ce..f3528a98c1 100644
--- a/source3/lib/dbwrap/dbwrap_tdb.c
+++ b/source3/lib/dbwrap/dbwrap_tdb.c
@@ -160,12 +160,17 @@ static int db_tdb_fetch(struct db_context *db, TALLOC_CTX *mem_ctx,
db->private_data, struct db_tdb_ctx);
struct tdb_fetch_state state;
+ int ret;
state.mem_ctx = mem_ctx;
state.result = 0;
state.data = tdb_null;
- tdb_parse_record(ctx->wtdb->tdb, key, db_tdb_fetch_parse, &state);
+ ret = tdb_parse_record(ctx->wtdb->tdb, key, db_tdb_fetch_parse, &state);
+
+ if (ret < 0) {
+ return -1;
+ }
if (state.result == -1) {
return -1;