mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 15:43:38 +00:00
ws2_32: Fix memory leaks on error paths in unix_gethostby* (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
978df2e031
commit
6daef74f67
|
@ -865,9 +865,9 @@ static NTSTATUS unix_gethostbyaddr( void *args )
|
|||
}
|
||||
|
||||
if (!unix_host)
|
||||
return (locerr < 0 ? errno_from_unix( errno ) : host_errno_from_unix( locerr ));
|
||||
|
||||
ret = hostent_from_unix( unix_host, params->host, params->size );
|
||||
ret = (locerr < 0 ? errno_from_unix( errno ) : host_errno_from_unix( locerr ));
|
||||
else
|
||||
ret = hostent_from_unix( unix_host, params->host, params->size );
|
||||
|
||||
free( unix_buffer );
|
||||
return ret;
|
||||
|
@ -915,9 +915,9 @@ static NTSTATUS unix_gethostbyname( void *args )
|
|||
}
|
||||
|
||||
if (!unix_host)
|
||||
return (locerr < 0 ? errno_from_unix( errno ) : host_errno_from_unix( locerr ));
|
||||
|
||||
ret = hostent_from_unix( unix_host, params->host, params->size );
|
||||
ret = (locerr < 0 ? errno_from_unix( errno ) : host_errno_from_unix( locerr ));
|
||||
else
|
||||
ret = hostent_from_unix( unix_host, params->host, params->size );
|
||||
|
||||
free( unix_buffer );
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue