From: Hiltjo Posthuma Date: Wed, 17 Dec 2014 11:54:57 +0000 (+0000) Subject: no need to check for NULL before free X-Git-Tag: v1.0~92^2~101 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=81a0c57783c3d1dae93f0b13d7236146f094a5c2;p=nnn.git no need to check for NULL before free --- 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: