ldb:ldb_dn.c - ldb_dn_explode - free also the extended components on error cases
[kamenim/samba.git] / source4 / lib / ldb / common / ldb_dn.c
index 69018b7bfc7b0fc838b8195a8b6d5293a70503a5..a17d5166b1c1d8693679b2a1069e8eea4a41e328 100644 (file)
@@ -729,8 +729,11 @@ static bool ldb_dn_explode(struct ldb_dn *dn)
        return true;
 
 failed:
+       LDB_FREE(dn->components);
        dn->comp_num = 0;
-       talloc_free(dn->components);
+       LDB_FREE(dn->ext_components);
+       dn->ext_comp_num = 0;
+
        return false;
 }