Commit 6daef74f authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

ws2_32: Fix memory leaks on error paths in unix_gethostby* (scan-build).

parent 978df2e0
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment