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)
|
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 );
|
ret = hostent_from_unix( unix_host, params->host, params->size );
|
||||||
|
|
||||||
free( unix_buffer );
|
free( unix_buffer );
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -915,9 +915,9 @@ static NTSTATUS unix_gethostbyname( void *args )
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!unix_host)
|
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 );
|
ret = hostent_from_unix( unix_host, params->host, params->size );
|
||||||
|
|
||||||
free( unix_buffer );
|
free( unix_buffer );
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue