Make two buffer variables static for now. It is not safe to

reference stack memory after return.

MFC after:	2 weeks
This commit is contained in:
Xin LI 2013-07-31 07:09:35 +00:00
parent cab9f71ffe
commit 5428273365
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=253834

View file

@ -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;