From: Douglas Bagnall Date: Fri, 8 Feb 2019 02:49:56 +0000 (+1300) Subject: ldb_dn: don't free a known NULL pointer X-Git-Tag: ldb-1.6.1~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d21801b88877629dfe04bf552d5dbffb2143400a;p=thirdparty%2Fsamba.git ldb_dn: don't free a known NULL pointer Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/lib/ldb/common/ldb_dn.c b/lib/ldb/common/ldb_dn.c index f053e815ad4..a2122a8a80a 100644 --- a/lib/ldb/common/ldb_dn.c +++ b/lib/ldb/common/ldb_dn.c @@ -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 */