Fixes:
source3/lib/dbwrap/dbwrap_ctdb.c:530:39: warning: Access to field 'm_write' results in a dereference of a null pointer (loaded from field 'transaction') <--[clang]
if (pull_newest_from_marshall_buffer(ctx->transaction->m_write, key,
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
result->storev = db_ctdb_storev_transaction;
result->delete_rec = db_ctdb_delete_transaction;
+ if (ctx->transaction == NULL) {
+ DEBUG(0, ("no transaction available\n"));
+ TALLOC_FREE(result);
+ return NULL;
+ }
if (pull_newest_from_marshall_buffer(ctx->transaction->m_write, key,
NULL, result, &result->value)) {
return result;