diff options
author | Volker Lendecke <vl@samba.org> | 2015-01-09 15:45:41 +0100 |
---|---|---|
committer | Ralph Böhme <slow@samba.org> | 2015-01-11 18:12:10 +0100 |
commit | 7dceb3a2df49101cd940f7cd1b2798c81dd4e9d9 (patch) | |
tree | 1a8b351292ca3fc643777a11703027f908185d3a | |
parent | 6c76c5ef93cd51d0c19faa78cecdc49a3ff5fd03 (diff) | |
download | samba-7dceb3a2df49101cd940f7cd1b2798c81dd4e9d9.tar.gz samba-7dceb3a2df49101cd940f7cd1b2798c81dd4e9d9.tar.xz samba-7dceb3a2df49101cd940f7cd1b2798c81dd4e9d9.zip |
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>
-rw-r--r-- | source3/locking/leases_db.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/locking/leases_db.c b/source3/locking/leases_db.c index 0700ba94b8..eceecd816b 100644 --- a/source3/locking/leases_db.c +++ b/source3/locking/leases_db.c @@ -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; } |