1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

s3:libads: Free addr before we free the context

Introduced by dbdbd4875e

CID 1438395

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13567

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 14 22:02:06 CEST 2018 on sn-devel-144
This commit is contained in:
Andreas Schneider 2018-08-14 18:55:33 +02:00 committed by Jeremy Allison
parent e4f38b0670
commit 9eccf6a16f

View File

@ -222,9 +222,9 @@ static ADS_STATUS ads_krb5_chg_password(const char *kdc_host,
/* We have to obtain an INITIAL changepw ticket for changing password */
if (asprintf(&chpw_princ, "kadmin/changepw@%s", realm) == -1) {
krb5_get_init_creds_opt_free(context, opts);
smb_krb5_free_addresses(context, addr);
krb5_free_context(context);
free(realm);
smb_krb5_free_addresses(context, addr);
DEBUG(1,("ads_krb5_chg_password: asprintf fail\n"));
return ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
}