]> git.pld-linux.org Git - packages/nfs-utils.git/blame - nfs-utils-mountd-leak.patch
- fix memory leak in mountd
[packages/nfs-utils.git] / nfs-utils-mountd-leak.patch
CommitLineData
c9b40043
JR
1commit 1cb4a250fb9f0a8ba34befa47d951430e444a58e
2Author: Steinar H. Gunderson <sesse@debian.org>
3Date: Fri May 11 21:02:09 2007 +1000
4
5 Memory leak in mountd
6
7 In client_compose(), free() the hostent structure returned before
8 exiting. Normally, gethostbyaddr() returns a pointer to a static
9 struct, but this hostent comes from either get_reliable_hostbyaddr() or
10 get_hostent(), both which return a pointer they privately xmalloc()ed,
11 which thus can and should be free()d.
12
13 Signed-Off-By: Steinar H. Gunderson <sesse@debian.org>
14
15diff --git a/support/export/client.c b/support/export/client.c
16index 686c744..19b53aa 100644
17--- a/support/export/client.c
18+++ b/support/export/client.c
19@@ -262,6 +262,7 @@ client_compose(struct in_addr addr)
20 name = add_name(name, clp->m_hostname);
21 }
22 }
23+ free(he);
24 return name;
25 }
26
This page took 0.038372 seconds and 4 git commands to generate.