ldb_tdb: Call talloc_free(options_dn) as soon as we are done with options_dn
authorAndrew Bartlett <abartlet@samba.org>
Thu, 30 Mar 2017 00:11:15 +0000 (13:11 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 22 May 2017 23:13:25 +0000 (01:13 +0200)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
lib/ldb/ldb_tdb/ldb_cache.c

index 5ea09d6c7eac3df6a8bc7cb9322deaf7940a7d6a..388b461ece1eaa1eb96821f2dbfa3b50cd2a7334 100644 (file)
@@ -385,6 +385,7 @@ int ltdb_cache_load(struct ldb_module *module)
        if (options_dn == NULL) goto failed;
 
        r= ltdb_search_dn1(module, options_dn, options, 0);
+       talloc_free(options_dn);
        if (r != LDB_SUCCESS && r != LDB_ERR_NO_SUCH_OBJECT) {
                goto failed;
        }