diff toys/posix/nohup.c @ 1529:e127aa575ff2 draft

More static analysis fixes from Ashwini Sharma.
author Rob Landley <rob@landley.net>
date Mon, 20 Oct 2014 19:56:05 -0500
parents 76965793e8f4
children cbb1aca81eca
line wrap: on
line diff
--- a/toys/posix/nohup.c	Mon Oct 20 19:52:29 2014 -0500
+++ b/toys/posix/nohup.c	Mon Oct 20 19:56:05 2014 -0500
@@ -28,8 +28,10 @@
         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)) {