ldb: Fix memory leak in ldb_kv_index_dn_ordered()
commit0a87f59ac2580bdb7f93efa075323c73fc1ec83e
authorAndrew Bartlett <abartlet@samba.org>
Wed, 26 Feb 2020 22:12:55 +0000 (27 11:12 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 28 Feb 2020 03:08:45 +0000 (28 03:08 +0000)
treebdadaa33dd0363fd6cf5a6b031b85bc05800f5e4
parentb29e6480dc3b266ca1f311f675f67670f5635a21
ldb: Fix memory leak in ldb_kv_index_dn_ordered()

We need to ensure we TALLOC_FREE(tmp_ctx) in every error exit.

Reported by Alex Kolesnik, ABISoft Ltd., www.abisoft.biz.  Thanks!

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14299

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
lib/ldb/ldb_key_value/ldb_kv_index.c