From c5ce372a361bc4f68aa74fae92bec60e981830ec Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 10 Aug 2016 19:34:46 +0100 Subject: [PATCH] Fix memory leak in the new make_dir_path(). Thanks to Jason Andryuk for promptly pointing it out. --- unix/uxmisc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unix/uxmisc.c b/unix/uxmisc.c index 05d741c5..daa61a01 100644 --- a/unix/uxmisc.c +++ b/unix/uxmisc.c @@ -340,6 +340,8 @@ char *make_dir_path(const char *path, mode_t mode) sfree(prefix); return ret; } + + sfree(prefix); } if (!path[pos])