diff options
author | Rob Landley <rob@landley.net> | 2014-10-20 19:56:05 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-10-20 19:56:05 -0500 |
commit | 21f3c8db00f0d4a3f0989559847d2564f4c73a11 (patch) | |
tree | 50d7f1092d749394c66fe0f69bc742b8be4aecd5 /toys/posix/nohup.c | |
parent | 977e48e1626b3e3f1f1f9b14f05ffc11e252455f (diff) | |
download | toybox-21f3c8db00f0d4a3f0989559847d2564f4c73a11.tar.gz |
More static analysis fixes from Ashwini Sharma.
Diffstat (limited to 'toys/posix/nohup.c')
-rw-r--r-- | toys/posix/nohup.c | 2 |
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)) { |