summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-09-29 09:23:45 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-09-29 09:23:45 -0700
commit304a11be4727c5a7feeb2501e8e001466f8ce84e (patch)
tree043f50b76fdc9ead832e7b54937c096463078433
parent67beb3d0bc41c3416902c858f595b35306f76704 (diff)
XauFileName: always go through buf allocation if buf is NULL
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-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);