]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ldb: Fix memory leak on module context
authorLukas Slebodnik <lslebodn@fedoraproject.org>
Sat, 21 Oct 2017 13:09:01 +0000 (15:09 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 26 Jun 2018 07:19:16 +0000 (09:19 +0200)
Introduced in e8cdacc509016d9273d63faf334d9f827585c3eb

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

Signed-off-by: Lukas Slebodnik <lslebodn@fedoraproject.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jun  1 11:10:24 CEST 2018 on sn-devel-144

(cherry picked from commit d161aa3522576545d269208426bb0014ee2ab35f)

lib/ldb/ldb_tdb/ldb_index.c

index 251f6295f5499de795f19e83bd49638aa38351e3..290d9b6482b880b528dfa72f4734162492d73715 100644 (file)
@@ -523,9 +523,9 @@ static int ltdb_dn_list_store_full(struct ldb_module *module,
        if (list->count == 0) {
                ret = ltdb_delete_noindex(module, msg);
                if (ret == LDB_ERR_NO_SUCH_OBJECT) {
-                       talloc_free(msg);
-                       return LDB_SUCCESS;
+                       ret = LDB_SUCCESS;
                }
+               talloc_free(msg);
                return ret;
        }