If smbXsrv_open_global_parse_record() fails, global remains NULL. The
do_delete path then attempts to dereference it, causing a crash. Add a
NULL check before accessing global->client_guid and global->create_guid.
Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
state->global_id,
dbwrap_name(dbwrap_record_get_db(rec)));
state->status = NT_STATUS_OK;
- state->client_guid = global->client_guid;
- state->create_guid = global->create_guid;
+ if (global != NULL) {
+ state->client_guid = global->client_guid;
+ state->create_guid = global->create_guid;
+ }
}
NTSTATUS smbXsrv_open_cleanup(uint64_t persistent_id)