summaryrefslogtreecommitdiff
path: root/AuFileName.c
diff options
context:
space:
mode:
Diffstat (limited to 'AuFileName.c')
-rw-r--r--AuFileName.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/AuFileName.c b/AuFileName.c
index 63d4956..7cedfcc 100644
--- a/AuFileName.c
+++ b/AuFileName.c
@@ -66,7 +66,7 @@ XauFileName (void)
return NULL;
}
size = strlen (name) + strlen(&slashDotXauthority[1]) + 2;
- if (size > bsize) {
+ if ((size > bsize) || (buf == NULL)) {
if (buf)
free (buf);
buf = malloc (size);