From 7c6d77dd883df958f9231f28d0080573e08e8add Mon Sep 17 00:00:00 2001 From: Michael Adam <obnox@samba.org> Date: Wed, 9 Jan 2008 22:09:55 +0100 Subject: Fix memleak in ldapsam_rename_sam_account() found by IBM checker. The check for out of memory was the wrong way round. Michael (This used to be commit d7a7b793203b986823859ac5171d2d4c30e52415) --- source3/passdb/pdb_ldap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/passdb') diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 28df56bdb1..90a6ff011b 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -1973,7 +1973,7 @@ static NTSTATUS ldapsam_rename_sam_account(struct pdb_methods *my_methods, /* rename the posix user */ rename_script = SMB_STRDUP(lp_renameuser_script()); - if (rename_script) { + if (rename_script == NULL) { return NT_STATUS_NO_MEMORY; } -- cgit