diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-04-12 20:06:29 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-04-12 20:06:29 +0530 |
commit | 3e4797f7289e16c61cf5af9abdec456e0049c67d (patch) | |
tree | 14dd2dd149247c16882d206359ebd4065283f753 /src/nnn.c | |
parent | 7b07e8e0e899c3f7d9521fd48babc4eab0bc5192 (diff) | |
download | nnn-3e4797f7289e16c61cf5af9abdec456e0049c67d.tar.gz |
Free readline buffer in corner cases
Diffstat (limited to 'src/nnn.c')
-rw-r--r-- | src/nnn.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 } |