Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff7c4b36 authored by fanchaoting's avatar fanchaoting Committed by J. Bruce Fields
Browse files

nfsd: remove /proc/fs/nfs when create /proc/fs/nfs/exports error



when create /proc/fs/nfs/exports error, we should remove /proc/fs/nfs,
if don't do it, it maybe cause Memory leak.

 Signed-off-by: default avatarfanchaoting <fanchaoting@cn.fujitsu.com>
 Reviewed-by: default avatarchendt.fnst <chendt.fnst@cn.fujitsu.com>

Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent b022032e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1111,8 +1111,10 @@ static int create_proc_exports_entry(void)
		return -ENOMEM;
	entry = proc_create("exports", 0, entry,
				 &exports_proc_operations);
	if (!entry)
	if (!entry) {
		remove_proc_entry("fs/nfs", NULL);
		return -ENOMEM;
	}
	return 0;
}
#else /* CONFIG_PROC_FS */