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:
Alex Henrie 2022-02-02 00:23:19 -07:00 committed by Alexandre Julliard
parent 978df2e031
commit 6daef74f67
1 changed files with 6 additions and 6 deletions

View File

@ -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;