nnn

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

commit 3e4797f7289e16c61cf5af9abdec456e0049c67d
parent 7b07e8e0e899c3f7d9521fd48babc4eab0bc5192
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Fri, 12 Apr 2019 20:06:29 +0530

Free readline buffer in corner cases

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

diff --git a/src/nnn.c b/src/nnn.c @@ -3830,6 +3830,8 @@ nochange: if (chdir(ipath) == -1) { printwarn(); + if (tmp) + free(tmp); goto nochange; } @@ -3839,8 +3841,10 @@ nochange: spawn(shell, "-c", tmp, path, F_CLI); /* readline finishing touches */ add_history(tmp); - free(tmp); } + + if (tmp) + free(tmp); } #endif }