summaryrefslogtreecommitdiffstats
path: root/sbin/swapon
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2013-07-31 07:09:35 +0000
committerdelphij <delphij@FreeBSD.org>2013-07-31 07:09:35 +0000
commitcf0d40cd38c7fa6da7d1def7031f6aaa7684b4d2 (patch)
tree799e196d07730b184fe9680c21dfb115db7782fb /sbin/swapon
parente07cc719808308b44f63f6fd6236d4580948b5e7 (diff)
downloadFreeBSD-src-cf0d40cd38c7fa6da7d1def7031f6aaa7684b4d2.zip
FreeBSD-src-cf0d40cd38c7fa6da7d1def7031f6aaa7684b4d2.tar.gz
Make two buffer variables static for now. It is not safe to
reference stack memory after return. MFC after: 2 weeks
Diffstat (limited to 'sbin/swapon')
-rw-r--r--sbin/swapon/swapon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c
index 5dcb18d..d93277c 100644
--- a/sbin/swapon/swapon.c
+++ b/sbin/swapon/swapon.c
@@ -446,7 +446,7 @@ swap_on_off_md(const char *name, char *mntops, int doingall)
FILE *sfd;
int fd, mdunit, error;
const char *ret;
- char mdpath[PATH_MAX], linebuf[PATH_MAX];
+ static char mdpath[PATH_MAX], linebuf[PATH_MAX];
char *p, *vnodefile;
size_t linelen;
u_long ul;
OpenPOWER on IntegriCloud