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,8 +865,8 @@ static NTSTATUS unix_gethostbyaddr( void *args )
|
|||
}
|
||||
|
||||
if (!unix_host)
|
||||
return (locerr < 0 ? errno_from_unix( errno ) : host_errno_from_unix( locerr ));
|
||||
|
||||
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 );
|
||||
|
@ -915,8 +915,8 @@ static NTSTATUS unix_gethostbyname( void *args )
|
|||
}
|
||||
|
||||
if (!unix_host)
|
||||
return (locerr < 0 ? errno_from_unix( errno ) : host_errno_from_unix( locerr ));
|
||||
|
||||
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 );
|
||||
|
|
Loading…
Reference in New Issue