1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ldb_dn: don't free a known NULL pointer

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2019-02-08 15:49:56 +13:00 committed by Andrew Bartlett
parent d4ebe00688
commit d21801b888

View File

@ -325,12 +325,9 @@ static bool ldb_dn_explode(struct ldb_dn *dn)
return true;
}
/* make sure we free this if allocated previously before replacing */
LDB_FREE(dn->components);
dn->comp_num = 0;
LDB_FREE(dn->ext_components);
dn->ext_comp_num = 0;
dn->comp_num = 0;
/* in the common case we have 3 or more components */
/* make sure all components are zeroed, other functions depend on it */