summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-13 11:56:17 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-13 14:17:45 -0800
commit7545e0ed63cb03e5a6065a9823710d02f560692c (patch)
tree9577e344b9bea3536f461a34500c2257fcbd8db0
parenta6059bdf3d3baea176c9a69ffd5b39a22b4af902 (diff)
Remove unnecessary check for NULL pointer before calling free()
Resolves cppcheck warning: xset.c:996:9: style: Condition 'directoryList' is always true [knownConditionTrueFalse] if (directoryList) ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xset.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xset.c b/xset.c
index d950b70..052d705 100644
--- a/xset.c
+++ b/xset.c
@@ -986,8 +986,7 @@ set_font_path(Display *dpy, const char *path, int special, int before, int after
}
free(directories);
- if (directoryList)
- free(directoryList);
+ free(directoryList);
if (currentList)
XFreeFontPath(currentList);