Commit 2074b404 authored by Andrew Bartlett's avatar Andrew Bartlett Committed by Gerald (Jerry) Carter
Browse files

r1124: ntlm_auth memory leak fixes by James Wilkinson - jwilk@alumni.cse.ucsc.edu

Andrew Bartlett
(This used to be commit 94c0827ce20d8d1084703f6f5e4ad3b3c33151f8)
parent 3542b99c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -369,6 +369,7 @@ NTSTATUS contact_winbind_auth_crap(const char *username,
		nt_status = NT_STATUS_UNSUCCESSFUL;
		if (error_string)
			*error_string = smb_xstrdup("Reading winbind reply failed!");
		free_response(&response);
		return nt_status;
	}
	
@@ -376,6 +377,7 @@ NTSTATUS contact_winbind_auth_crap(const char *username,
	if (!NT_STATUS_IS_OK(nt_status)) {
		if (error_string) 
			*error_string = smb_xstrdup(response.data.auth.error_string);
		free_response(&response);
		return nt_status;
	}

@@ -390,10 +392,12 @@ NTSTATUS contact_winbind_auth_crap(const char *username,

	if (flags & WBFLAG_PAM_UNIX_NAME) {
		if (pull_utf8_allocate(unix_name, (char *)response.extra_data) == -1) {
			free_response(&response);
			return NT_STATUS_NO_MEMORY;
		}
	}

	free_response(&response);
	return nt_status;
}