1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

smbd: fix crash in smbXsrv_client_global_remove()

Probably copy-n-paste error.
Uncovered by the multi-channel-related tests we're
currently writing to exercise this code more.

Pair-Programmed-With: Guenther Deschner <gd@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Michael Adam 2016-03-01 20:40:47 +01:00
parent a5f441dc71
commit 04265199b3

View File

@ -428,7 +428,6 @@ static NTSTATUS smbXsrv_client_global_store(struct smbXsrv_client_global0 *globa
static NTSTATUS smbXsrv_client_global_remove(struct smbXsrv_client_global0 *global) static NTSTATUS smbXsrv_client_global_remove(struct smbXsrv_client_global0 *global)
{ {
struct smbXsrv_client_globalB global_blob;
TDB_DATA key; TDB_DATA key;
NTSTATUS status; NTSTATUS status;
@ -453,11 +452,8 @@ static NTSTATUS smbXsrv_client_global_remove(struct smbXsrv_client_global0 *glob
return status; return status;
} }
global->stored = false; global->stored = false;
if (DEBUGLVL(DBGLVL_DEBUG)) { DBG_DEBUG("key '%s' delete\n",
DBG_DEBUG("key '%s' delete\n", hex_encode_talloc(global->db_rec, key.dptr, key.dsize));
hex_encode_talloc(global->db_rec, key.dptr, key.dsize));
NDR_PRINT_DEBUG(smbXsrv_client_globalB, &global_blob);
}
TALLOC_FREE(global->db_rec); TALLOC_FREE(global->db_rec);