From 81a0c57783c3d1dae93f0b13d7236146f094a5c2 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Wed, 17 Dec 2014 11:54:57 +0000 Subject: [PATCH] no need to check for NULL before free --- noice.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/noice.c b/noice.c index b50cddfe..f62619a2 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: