]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix memory leak in the new make_dir_path().
authorSimon Tatham <anakin@pobox.com>
Wed, 10 Aug 2016 18:34:46 +0000 (19:34 +0100)
committerSimon Tatham <anakin@pobox.com>
Wed, 10 Aug 2016 18:34:46 +0000 (19:34 +0100)
Thanks to Jason Andryuk for promptly pointing it out.

unix/uxmisc.c

index 05d741c5e32c8f521a07c15c1a0ea7cd7d386820..daa61a0193665909755938231c0d10a84ce703ba 100644 (file)
@@ -340,6 +340,8 @@ char *make_dir_path(const char *path, mode_t mode)
                 sfree(prefix);
                 return ret;
             }
+
+            sfree(prefix);
         }
 
         if (!path[pos])