aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2013-04-26 01:59:13 -0500
committerRob Landley <rob@landley.net>2013-04-26 01:59:13 -0500
commita4a6dfb584a3de8c947d2ccf159b53bf56daebb7 (patch)
tree721b924d4539d7596aa69c6c3a33170c00f7be1c /lib
parent4f499558a11f46d91b1a9f81a02c49226249d9ab (diff)
downloadtoybox-a4a6dfb584a3de8c947d2ccf159b53bf56daebb7.tar.gz
Remove leaked global path_mounts.
Diffstat (limited to 'lib')
-rw-r--r--lib/getmountlist.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/getmountlist.c b/lib/getmountlist.c
index 372398ba..09ed9029 100644
--- a/lib/getmountlist.c
+++ b/lib/getmountlist.c
@@ -7,8 +7,6 @@
#include <mntent.h>
-char *path_mounts = "/proc/mounts";
-
// Get a list of mount points from /etc/mtab or /proc/mounts, including
// statvfs() information. This returns a reversed list, which is good for
// finding overmounts and such.
@@ -18,7 +16,7 @@ struct mtab_list *getmountlist(int die)
FILE *fp;
struct mtab_list *mtlist, *mt;
struct mntent me;
- char evilbuf[2*PATH_MAX];
+ char evilbuf[2*PATH_MAX], *path_mounts = "/proc/mounts";
mtlist = 0;
if (!(fp = setmntent(path_mounts, "r"))) {