From 304a11be4727c5a7feeb2501e8e001466f8ce84e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 29 Sep 2013 09:23:45 -0700 Subject: XauFileName: always go through buf allocation if buf is NULL Signed-off-by: Alan Coopersmith --- AuFileName.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3