]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mountd/v4root.c
mountd: Plug v4root memory leak
[nfs-utils.git] / utils / mountd / v4root.c
index c33a5a9eb79d690580e81825de197d799d214ded..81f813bde067777d4b357c86a2ea30a7d1bf0eee 100644 (file)
@@ -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;