Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/ws2_32/unixlib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/ws2_32/unixlib.c b/dlls/ws2_32/unixlib.c index e89ebe35248..45018199add 100644 --- a/dlls/ws2_32/unixlib.c +++ b/dlls/ws2_32/unixlib.c @@ -865,12 +865,13 @@ static NTSTATUS unix_gethostbyaddr( void *args ) unix_buffer = new_buffer; }
+ free( unix_buffer ); + 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 );
- free( unix_buffer ); return ret; } #else @@ -915,12 +916,13 @@ static NTSTATUS unix_gethostbyname( void *args ) unix_buffer = new_buffer; }
+ free( unix_buffer ); + 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 );
- free( unix_buffer ); return ret; } #else