mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
r16201: Fix Klocwork 439
(This used to be commit b369d0891afe8b777b837eaac317131232568ca7)
This commit is contained in:
parent
c0e4753cfc
commit
edcffcbe28
@ -528,7 +528,6 @@ ADS_STATUS ads_krb5_set_password(const char *kdc_host, const char *princ,
|
||||
DEBUG(1,("Failed to parse kadmin/changepw (%s)\n", error_message(ret)));
|
||||
return ADS_ERROR_KRB5(ret);
|
||||
}
|
||||
free(princ_name);
|
||||
|
||||
/* parse the principal we got as a function argument */
|
||||
ret = smb_krb5_parse_name(context, princ, &principal);
|
||||
@ -537,9 +536,12 @@ ADS_STATUS ads_krb5_set_password(const char *kdc_host, const char *princ,
|
||||
krb5_free_principal(context, creds.server);
|
||||
krb5_free_context(context);
|
||||
DEBUG(1,("Failed to parse %s (%s)\n", princ_name, error_message(ret)));
|
||||
free(princ_name);
|
||||
return ADS_ERROR_KRB5(ret);
|
||||
}
|
||||
|
||||
free(princ_name);
|
||||
|
||||
/* The creds.server principal takes ownership of this memory.
|
||||
Remember to set back to original value before freeing. */
|
||||
orig_realm = *krb5_princ_realm(context, creds.server);
|
||||
|
Loading…
x
Reference in New Issue
Block a user