mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
libsmb: Fix CID 1467087: Resource leaks
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Sep 23 18:20:36 UTC 2020 on sn-devel-184
This commit is contained in:
parent
c6a11d8dcd
commit
08c4dd586f
@ -2836,6 +2836,7 @@ static NTSTATUS resolve_hosts(TALLOC_CTX *mem_ctx,
|
||||
/* wrap check. */
|
||||
if (ret_count + 1 < ret_count) {
|
||||
freeaddrinfo(ailist);
|
||||
TALLOC_FREE(iplist);
|
||||
return NT_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
ret_count += 1;
|
||||
@ -2846,6 +2847,7 @@ static NTSTATUS resolve_hosts(TALLOC_CTX *mem_ctx,
|
||||
if (tmp == NULL) {
|
||||
DEBUG(3,("resolve_hosts: malloc fail !\n"));
|
||||
freeaddrinfo(ailist);
|
||||
TALLOC_FREE(iplist);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
iplist = tmp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user