diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2012-01-05 16:01:22 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2012-01-05 16:27:05 -0500 |
commit | cd4f4d13848bd64f98290ef67ef8572d998d3041 (patch) | |
tree | 020748192a7ca80a11af304a1329ecec0b6bfca9 /utils/mountd/v4root.c | |
parent | fa14db707efd309cd567648a4a0ffdbf06f5e2c9 (diff) | |
download | nfs-utils-cd4f4d13848bd64f98290ef67ef8572d998d3041.tar.gz nfs-utils-cd4f4d13848bd64f98290ef67ef8572d998d3041.tar.xz nfs-utils-cd4f4d13848bd64f98290ef67ef8572d998d3041.zip |
mountd: Plug v4root memory leak
Valgrind reports that the memory allocated for eep's e_hostname field
was not being freed. eep is not visible outside of v4root_create(),
so we don't need to strdup() that string.
Introduced by commit 3b777b0 "exports: NFSv4 pseudoroot support
routines" (Dec 1, 2009).
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/mountd/v4root.c')
-rw-r--r-- | utils/mountd/v4root.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/mountd/v4root.c b/utils/mountd/v4root.c index c33a5a9..81f813b 100644 --- a/utils/mountd/v4root.c +++ b/utils/mountd/v4root.c @@ -83,7 +83,7 @@ v4root_create(char *path, nfs_export *export) struct exportent *curexp = &export->m_export; dupexportent(&eep, &pseudo_root.m_export); - eep.e_hostname = strdup(curexp->e_hostname); + eep.e_hostname = curexp->e_hostname; strncpy(eep.e_path, path, sizeof(eep.e_path)); if (strcmp(path, "/") != 0) eep.e_flags &= ~NFSEXP_FSID; |