s4:ldb_dn: reset dn->ext_comp_num in ldb_dn_explode()
authorStefan Metzmacher <metze@samba.org>
Thu, 25 Feb 2010 22:19:53 +0000 (23:19 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 26 Feb 2010 22:26:33 +0000 (23:26 +0100)
metze

source4/lib/ldb/common/ldb_dn.c

index c395be29007813ad365114422f0152f94cc3f5fd..c5c8c2e0653ea922f75a4267b7b8bfa52856d1dc 100644 (file)
@@ -333,8 +333,8 @@ static bool ldb_dn_explode(struct ldb_dn *dn)
        /* make sure we free this if alloced previously before replacing */
        talloc_free(dn->components);
 
-       talloc_free(dn->ext_components);
-       dn->ext_components = NULL;
+       LDB_FREE(dn->ext_components);
+       dn->ext_comp_num = 0;
 
        /* in the common case we have 3 or more components */
        /* make sure all components are zeroed, other functions depend on it */