mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Free readline buffer in corner cases
This commit is contained in:
parent
7b07e8e0e8
commit
3e4797f728
|
@ -3830,6 +3830,8 @@ nochange:
|
||||||
|
|
||||||
if (chdir(ipath) == -1) {
|
if (chdir(ipath) == -1) {
|
||||||
printwarn();
|
printwarn();
|
||||||
|
if (tmp)
|
||||||
|
free(tmp);
|
||||||
goto nochange;
|
goto nochange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3839,8 +3841,10 @@ nochange:
|
||||||
spawn(shell, "-c", tmp, path, F_CLI);
|
spawn(shell, "-c", tmp, path, F_CLI);
|
||||||
/* readline finishing touches */
|
/* readline finishing touches */
|
||||||
add_history(tmp);
|
add_history(tmp);
|
||||||
free(tmp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tmp)
|
||||||
|
free(tmp);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue