mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Fix double free when starting in list mode
This commit is contained in:
parent
a563c1a553
commit
4c18f22587
|
@ -4236,6 +4236,8 @@ static void rmlistpath()
|
||||||
DPRINTF_S(__FUNCTION__);
|
DPRINTF_S(__FUNCTION__);
|
||||||
DPRINTF_S(listpath);
|
DPRINTF_S(listpath);
|
||||||
spawn("rm -rf", listpath, NULL, NULL, F_NOTRACE | F_MULTI);
|
spawn("rm -rf", listpath, NULL, NULL, F_NOTRACE | F_MULTI);
|
||||||
|
/* Do not free if program was started in list mode */
|
||||||
|
if (listpath != initpath)
|
||||||
free(listpath);
|
free(listpath);
|
||||||
listpath = NULL;
|
listpath = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue