diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-06-17 02:46:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:18:19 -0500 |
commit | 52400f0f7d26727a59797e21c09a1433daf094e4 (patch) | |
tree | d50905365fb06c9e0263c0a160367bd1b9702726 /source4/lib/ldb/ldb_ldap | |
parent | ab1e121b76a953f89592df8ec471603715b57dfc (diff) | |
download | samba-52400f0f7d26727a59797e21c09a1433daf094e4.tar.gz samba-52400f0f7d26727a59797e21c09a1433daf094e4.tar.bz2 samba-52400f0f7d26727a59797e21c09a1433daf094e4.zip |
r7666: fixed a memory leak in the ldap ldb backend
(This used to be commit ac3f33c61555a2afa30fe446676013564982e257)
Diffstat (limited to 'source4/lib/ldb/ldb_ldap')
-rw-r--r-- | source4/lib/ldb/ldb_ldap/ldb_ldap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c index 828bcc5d61..16beed58f8 100644 --- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c +++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c @@ -76,14 +76,13 @@ static int lldb_rename(struct ldb_module *module, const char *olddn, const char int ret = 0; char *newrdn, *p; const char *parentdn = ""; - TALLOC_CTX *mem_ctx = talloc_new(lldb); /* ignore ltdb specials */ if (olddn[0] == '@' ||newdn[0] == '@') { return 0; } - newrdn = talloc_strdup(mem_ctx, newdn); + newrdn = talloc_strdup(lldb, newdn); if (!newrdn) { return -1; } @@ -99,7 +98,7 @@ static int lldb_rename(struct ldb_module *module, const char *olddn, const char ret = -1; } - talloc_free(mem_ctx); + talloc_free(newrdn); return ret; } |