mirror of https://gitee.com/openkylin/libvirt.git
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…
Reference in New Issue