[PATCH libXau 2/3]Au FileName.c: remove redundant null check on calling free()
walter harms
wharms at bfs.de
Sat Oct 28 17:14:26 UTC 2017
remove redundant null check on calling free()
Signed-off-by: Walter Harms <wharms at bfs.de>
---
AuFileName.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/AuFileName.c b/AuFileName.c
index 2946c80..4ccda9d 100644
--- a/AuFileName.c
+++ b/AuFileName.c
@@ -68,8 +68,7 @@ XauFileName (void)
}
size = strlen (name) + strlen(&slashDotXauthority[1]) + 2;
if ((size > bsize) || (buf == NULL)) {
- if (buf)
- free (buf);
+ free (buf);
assert(size > 0);
buf = malloc (size);
if (!buf) {
--
2.1.4
More information about the xorg-devel
mailing list