r13190: Fix #3458 from Andriy Gapon <avg@icyb.net.ua>. Don't
authorJeremy Allison <jra@samba.org>
Fri, 27 Jan 2006 19:24:37 +0000 (19:24 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:06:16 +0000 (11:06 -0500)
access free'd memory.
Jerry please pick up for 3.0.21b !
Jeremy.

source/passdb/secrets.c

index c173a5ea868e8c6d183e5518f7c2233f27f05f18..14896a33400f6e7e0c3d8268869c31e10217f023 100644 (file)
@@ -299,7 +299,6 @@ BOOL secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16],
                *pass_last_set_time = pass->mod_time;
        }
        memcpy(ret_pwd, pass->hash, 16);
-       SAFE_FREE(pass);
 
        if (channel) {
                *channel = get_default_sec_channel();
@@ -313,6 +312,7 @@ BOOL secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16],
                }
        }
 
+       SAFE_FREE(pass);
        return True;
 }