提交 822f81c5 编写于 作者: M Michal Privoznik

nss: Don't leak @addr in gethostbyname4()

Similarly to gethostbyname3(), the @addr must be freed on return
from the function.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 e39100ac
...@@ -451,6 +451,7 @@ NSS_NAME(gethostbyname4)(const char *name, struct gaih_addrtuple **pat, ...@@ -451,6 +451,7 @@ NSS_NAME(gethostbyname4)(const char *name, struct gaih_addrtuple **pat,
*herrnop = NETDB_SUCCESS; *herrnop = NETDB_SUCCESS;
ret = NSS_STATUS_SUCCESS; ret = NSS_STATUS_SUCCESS;
cleanup: cleanup:
free(addr);
return ret; return ret;
} }
#endif /* HAVE_STRUCT_GAIH_ADDRTUPLE */ #endif /* HAVE_STRUCT_GAIH_ADDRTUPLE */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册