From 1cb4a250fb9f0a8ba34befa47d951430e444a58e Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 11 May 2007 21:02:09 +1000 Subject: [PATCH] Memory leak in mountd In client_compose(), free() the hostent structure returned before exiting. Normally, gethostbyaddr() returns a pointer to a static struct, but this hostent comes from either get_reliable_hostbyaddr() or get_hostent(), both which return a pointer they privately xmalloc()ed, which thus can and should be free()d. Signed-Off-By: Steinar H. Gunderson --- support/export/client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/support/export/client.c b/support/export/client.c index 686c744..19b53aa 100644 --- a/support/export/client.c +++ b/support/export/client.c @@ -262,6 +262,7 @@ client_compose(struct in_addr addr) name = add_name(name, clp->m_hostname); } } + free(he); return name; } -- 2.39.2