1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-11 00:23:51 +03:00

r7666: fixed a memory leak in the ldap ldb backend

This commit is contained in:
Andrew Tridgell
2005-06-17 02:46:25 +00:00
committed by Gerald (Jerry) Carter
parent b34a29dcf2
commit ac3f33c615

View File

@@ -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;
}