diff options
author | Rob Landley <rob@landley.net> | 2013-04-26 01:59:13 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2013-04-26 01:59:13 -0500 |
commit | a4a6dfb584a3de8c947d2ccf159b53bf56daebb7 (patch) | |
tree | 721b924d4539d7596aa69c6c3a33170c00f7be1c | |
parent | 4f499558a11f46d91b1a9f81a02c49226249d9ab (diff) | |
download | toybox-a4a6dfb584a3de8c947d2ccf159b53bf56daebb7.tar.gz |
Remove leaked global path_mounts.
-rw-r--r-- | lib/getmountlist.c | 4 |
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"))) { |