[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg-devel
Subject: [PATCH libXau 2/3]Au FileName.c: remove redundant null check on calling free()
From: walter harms <wharms () bfs ! de>
Date: 2017-10-28 17:14:26
Message-ID: 59F4BAF2.2080300 () bfs ! de
[Download RAW message or body]
remove redundant null check on calling free()
Signed-off-by: Walter Harms <wharms@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
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic