aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Hiltjo Posthuma <hiltjo@codemadness.org>2014-12-17 11:54:57 +0000
committerGravatar lostd <lostd@2f30.org>2014-12-18 11:02:34 +0200
commit81a0c57783c3d1dae93f0b13d7236146f094a5c2 (patch)
tree648312f19de817e12012f10ced220c872be52d3e
parentd444bf1cb6b1ef1c0436dd4b9e8ce0c6ea7b4ee9 (diff)
downloadnnn-81a0c57783c3d1dae93f0b13d7236146f094a5c2.tar.gz
no need to check for NULL before free
-rw-r--r--noice.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/noice.c b/noice.c
index b50cddf..f62619a 100644
--- a/noice.c
+++ b/noice.c
@@ -545,10 +545,8 @@ begin:
/* Find cur from history */
cur = dentfind(dents, n, path, oldpath);
- if (oldpath != NULL) {
- free(oldpath);
- oldpath = NULL;
- }
+ free(oldpath);
+ oldpath = NULL;
for (;;) {
redraw: