From 67beb3d0bc41c3416902c858f595b35306f76704 Mon Sep 17 00:00:00 2001 From: Fuminobu TAKEYAMA Date: Sun, 29 Sep 2013 09:21:05 -0700 Subject: XauFileName: reset bsize when malloc failed https://bugs.freedesktop.org/show_bug.cgi?id=69929 Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith --- AuFileName.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AuFileName.c b/AuFileName.c index 0904273..63d4956 100644 --- a/AuFileName.c +++ b/AuFileName.c @@ -70,8 +70,10 @@ XauFileName (void) if (buf) free (buf); buf = malloc (size); - if (!buf) + if (!buf) { + bsize = 0; return NULL; + } if (!atexit_registered) { atexit(free_filename_buffer); -- cgit v1.2.3