no need to check pointer before free - geomyidae - A small C-based gopherd. HTML git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 5bd1a482d555bce8593f1d3f6b12cbb27884a7b4 DIR parent 2760fe803a9ea8574dd7fa57b17708f283b5dbe0 HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 13 Sep 2018 20:43:36 +0200 no need to check pointer before free free(NULL) is valid. Signed-off-by: Christoph Lohmann <20h@r-36.net> Diffstat: M ind.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- DIR diff --git a/ind.c b/ind.c @@ -449,8 +449,7 @@ printelem(int fd, Elems *el, char *file, char *base, char *addr, char *port) free(el->e[2]); el->e[2] = xstrdup(p[0]? p : "/"); } - if (path != NULL) - free(path); + free(path); } if (dprintf(fd, "%.1s%s\t%s\t%s\t%s\r\n", el->e[0], el->e[1], el->e[2],