From e7f73d95cef66edeed08d8751d60ce7d9ae92d84 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Tue, 22 Jun 2021 20:51:23 +0530 Subject: [PATCH] Fix memory leak --- src/nnn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nnn.c b/src/nnn.c index 46d86d6d..cba66a0d 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -4332,9 +4332,11 @@ static bool handle_archive(char *fpath /* in-out param */, char op) if (x_to) { if (chdir(xdirname(fpath)) == -1) { printwarn(NULL); + free(outdir); return FALSE; } xstrsncpy(fpath, outdir, PATH_MAX); + free(outdir); } else if (op == 'x') fpath[0] = '\0';