mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
smbd: Fix an uninitialized variable read
If dbwrap_fetch_locked failed, we did a TALLOC_FREE(value). Fix this with a talloc hierarchy. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
6c76c5ef93
commit
7dceb3a2df
@ -243,7 +243,7 @@ NTSTATUS leases_db_del(const struct GUID *client_guid,
|
||||
goto out;
|
||||
}
|
||||
|
||||
value = talloc(talloc_tos(), struct leases_db_value);
|
||||
value = talloc(rec, struct leases_db_value);
|
||||
if (value == NULL) {
|
||||
status = NT_STATUS_NO_MEMORY;
|
||||
goto out;
|
||||
@ -308,7 +308,6 @@ NTSTATUS leases_db_del(const struct GUID *client_guid,
|
||||
|
||||
out:
|
||||
|
||||
TALLOC_FREE(value);
|
||||
TALLOC_FREE(rec);
|
||||
return status;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user