Introduction
Introduction Statistics Contact Development Disclaimer Help
no need to check pointer before free - geomyidae - A small C-based gopherd.
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri…
Log
Files
Refs
Tags
README
LICENSE
---
commit 5bd1a482d555bce8593f1d3f6b12cbb27884a7b4
parent 2760fe803a9ea8574dd7fa57b17708f283b5dbe0
Author: Hiltjo Posthuma <[email protected]>
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 <[email protected]>
Diffstat:
M ind.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/ind.c b/ind.c
@@ -449,8 +449,7 @@ printelem(int fd, Elems *el, char *file, char *base, char *…
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],
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.