nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 4c18f2258782c91b894055f0a4977700717599de
parent a563c1a5539ea2187d087b34240cd31ad6a217f5
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Tue,  5 May 2020 23:35:14 +0530

Fix double free when starting in list mode

Diffstat:
Msrc/nnn.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -4236,7 +4236,9 @@ static void rmlistpath() DPRINTF_S(__FUNCTION__); DPRINTF_S(listpath); spawn("rm -rf", listpath, NULL, NULL, F_NOTRACE | F_MULTI); - free(listpath); + /* Do not free if program was started in list mode */ + if (listpath != initpath) + free(listpath); listpath = NULL; } }