1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

Don't leak memory in error path.

Jeremy.
(This used to be commit 2df0cdaafd)
This commit is contained in:
Jeremy Allison 2008-01-23 15:23:16 -08:00
parent fe8a8f47e0
commit ffc84a1044

View File

@ -892,6 +892,7 @@ ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user,
if (realm && *realm) {
if (asprintf(&principal, "%s$@%s",
machine, realm) < 0) {
SAFE_FREE(machine);
SAFE_FREE(realm);
return ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
}