db_sc = open_schannel_session_store(tmpctx, lp_ctx);
if (!db_sc) {
- return NT_STATUS_ACCESS_DENIED;
+ status = NT_STATUS_ACCESS_DENIED;
+ goto fail;
}
status = schannel_store_session_key_tdb(db_sc, tmpctx, creds);
+fail:
talloc_free(tmpctx);
return status;
}