summaryrefslogtreecommitdiff
path: root/source3/libads/ldap.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-01 01:17:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:16 -0500
commitfae01b48994fd3168fd921af68dab1b4003adc49 (patch)
treed23f5f35a920315c73a0b9564fafe4962cd1caeb /source3/libads/ldap.c
parentf15327488985c7bea1ac507a3c76641fca9448ef (diff)
downloadsamba-fae01b48994fd3168fd921af68dab1b4003adc49.tar.gz
samba-fae01b48994fd3168fd921af68dab1b4003adc49.tar.bz2
samba-fae01b48994fd3168fd921af68dab1b4003adc49.zip
r21608: Fix a couple of memleaks in error code paths before
Coverity finds them :-) Jeremy. (This used to be commit cbe725f1b09f3d0edbdf823e0862edf21e16d336)
Diffstat (limited to 'source3/libads/ldap.c')
-rw-r--r--source3/libads/ldap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index e9d8bf6bbf..1d08a01a26 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -1635,7 +1635,7 @@ ADS_STATUS ads_create_machine_acct(ADS_STRUCT *ads, const char *machine_name,
char *samAccountName, *controlstr;
TALLOC_CTX *ctx;
ADS_MODLIST mods;
- char *machine_escaped;
+ char *machine_escaped = NULL;
char *new_dn;
const char *objectClass[] = {"top", "person", "organizationalPerson",
"user", "computer", NULL};
@@ -1681,6 +1681,7 @@ ADS_STATUS ads_create_machine_acct(ADS_STRUCT *ads, const char *machine_name,
ret = ads_gen_add(ads, new_dn, mods);
done:
+ SAFE_FREE(machine_escaped);
ads_msgfree(ads, res);
talloc_destroy(ctx);