summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2019-02-08 15:49:56 +1300
committerAndrew Bartlett <abartlet@samba.org>2019-02-13 04:15:15 +0100
commitd21801b88877629dfe04bf552d5dbffb2143400a (patch)
tree8fe97efb4b1db0bfe0d73ff40b5a85df415b390f /lib
parentd4ebe006885e100da6797e210f9331fabffec8d4 (diff)
downloadsamba-d21801b88877629dfe04bf552d5dbffb2143400a.tar.gz
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/ldb/common/ldb_dn.c5
1 files changed, 1 insertions, 4 deletions
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 */