s3: lib: dbwrap. Cleanup. Add a couple of missing 'return NULL' statements on talloc...
authorJeremy Allison <jra@samba.org>
Fri, 10 Jan 2020 23:55:29 +0000 (15:55 -0800)
committerJeremy Allison <jra@samba.org>
Mon, 13 Jan 2020 19:41:34 +0000 (19:41 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/lib/dbwrap/dbwrap_ctdb.c

index 11710603a5e960ceffd60fae09360be8d21e2157..3cbed6322b3718edb3d64b0c43ce69d74c3e6152 100644 (file)
@@ -554,6 +554,7 @@ static struct db_record *db_ctdb_fetch_locked_transaction(struct db_ctdb_ctx *ct
                         result->value.dsize))) {
                DEBUG(0, ("talloc failed\n"));
                TALLOC_FREE(result);
+               return NULL;
        }
        result->value_valid = true;
 
@@ -1246,6 +1247,7 @@ again:
                if (result->value.dptr == NULL) {
                        DBG_ERR("talloc failed\n");
                        TALLOC_FREE(result);
+                       return NULL;
                }
        }
        result->value_valid = true;