mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-06 20:00:05 +00:00
nss: Don't leak @addr in gethostbyname4()
Similarly to gethostbyname3(), the @addr must be freed on return from the function. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
e39100ac92
commit
822f81c59e
@ -451,6 +451,7 @@ NSS_NAME(gethostbyname4)(const char *name, struct gaih_addrtuple **pat,
|
||||
*herrnop = NETDB_SUCCESS;
|
||||
ret = NSS_STATUS_SUCCESS;
|
||||
cleanup:
|
||||
free(addr);
|
||||
return ret;
|
||||
}
|
||||
#endif /* HAVE_STRUCT_GAIH_ADDRTUPLE */
|
||||
|
Loading…
x
Reference in New Issue
Block a user