aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-10-20 19:56:05 -0500
committerRob Landley <rob@landley.net>2014-10-20 19:56:05 -0500
commit21f3c8db00f0d4a3f0989559847d2564f4c73a11 (patch)
tree50d7f1092d749394c66fe0f69bc742b8be4aecd5 /toys/posix
parent977e48e1626b3e3f1f1f9b14f05ffc11e252455f (diff)
downloadtoybox-21f3c8db00f0d4a3f0989559847d2564f4c73a11.tar.gz
More static analysis fixes from Ashwini Sharma.
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/nohup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/toys/posix/nohup.c b/toys/posix/nohup.c
index 0cece0b5..df264da2 100644
--- a/toys/posix/nohup.c
+++ b/toys/posix/nohup.c
@@ -28,8 +28,10 @@ void nohup_main(void)
S_IRUSR|S_IWUSR ))
{
char *temp = getenv("HOME");
+
temp = xmprintf("%s/%s", temp ? temp : "", "nohup.out");
xcreate(temp, O_CREAT|O_APPEND|O_WRONLY, 0600);
+ free(temp);
}
}
if (isatty(0)) {