diff options
author | Gary Lockyer <gary@catalyst.net.nz> | 2020-01-14 14:42:26 +1300 |
---|---|---|
committer | Gary Lockyer <gary@samba.org> | 2020-01-15 19:58:41 +0000 |
commit | 79460b1b9f3452d6d68014b84f4a9dc3988bd916 (patch) | |
tree | 34a1dc5dcc2e8394623e5d504540c2ad5d5457d9 | |
parent | 6b8a683884950603a690a2e7e3b267c21e458d6b (diff) | |
download | samba-79460b1b9f3452d6d68014b84f4a9dc3988bd916.tar.gz |
lib ldb common: Fix memory leakldb-2.1.0
TALLOC_FREE the ldb_control allocated in ldb_parse_control_from_string
when none of the cases match.
Credit to OSS-Fuzz
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: David Disseldorp <ddiss@samba.org>
-rw-r--r-- | lib/ldb/common/ldb_controls.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ldb/common/ldb_controls.c b/lib/ldb/common/ldb_controls.c index 8a727f74e6e..4af06a436ab 100644 --- a/lib/ldb/common/ldb_controls.c +++ b/lib/ldb/common/ldb_controls.c @@ -1282,6 +1282,7 @@ struct ldb_control *ldb_parse_control_from_string(struct ldb_context *ldb, TALLO /* * When no matching control has been found. */ + TALLOC_FREE(ctrl); return NULL; } |