summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap/dbwrap_tdb.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-04-19 10:47:07 +0200
committerVolker Lendecke <vl@samba.org>2012-04-19 17:37:38 +0200
commitf1c90e12f500201975ca63f175a48575bc9a7505 (patch)
tree40d36f9056383e66a720ff806c3bf80d3b60daa5 /source3/lib/dbwrap/dbwrap_tdb.c
parent85c1e895a5b4d520481de419aff04c2519198894 (diff)
downloadsamba-f1c90e12f500201975ca63f175a48575bc9a7505.tar.gz
samba-f1c90e12f500201975ca63f175a48575bc9a7505.tar.bz2
samba-f1c90e12f500201975ca63f175a48575bc9a7505.zip
s3: Fix Coverity ID 2744: CHECKED_RETURN
Diffstat (limited to 'source3/lib/dbwrap/dbwrap_tdb.c')
-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 2041613be2..59ed7910f7 100644
--- a/source3/lib/dbwrap/dbwrap_tdb.c
+++ b/source3/lib/dbwrap/dbwrap_tdb.c
@@ -110,7 +110,12 @@ static struct db_record *db_tdb_fetch_locked_internal(
state.mem_ctx = mem_ctx;
state.result = NULL;
- tdb_parse_record(ctx->wtdb->tdb, key, db_tdb_fetchlock_parse, &state);
+ if ((tdb_parse_record(ctx->wtdb->tdb, key, db_tdb_fetchlock_parse,
+ &state) < 0) &&
+ (tdb_error(ctx->wtdb->tdb) != TDB_ERR_NOEXIST)) {
+ tdb_chainunlock(ctx->wtdb->tdb, key);
+ return NULL;
+ }
if (state.result == NULL) {
db_tdb_fetchlock_parse(key, tdb_null, &state);