git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
316834c
)
s3:dbwrap_tdb: correctly catch the error from the return code of tdb_parse in db_tdb_...
author
Michael Adam
<obnox@samba.org>
Thu, 25 Aug 2011 11:45:40 +0000
(13:45 +0200)
committer
Michael Adam
<obnox@samba.org>
Thu, 25 Aug 2011 21:55:06 +0000
(23:55 +0200)
source3/lib/dbwrap/dbwrap_tdb.c
patch
|
blob
|
history
diff --git
a/source3/lib/dbwrap/dbwrap_tdb.c
b/source3/lib/dbwrap/dbwrap_tdb.c
index aca57b63ce7cc038b403da1736a762026b89c397..f3528a98c1a3dd35aaf5495e63e6e27ffe890596 100644
(file)
--- 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;