summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuminobu TAKEYAMA <ftake@geeko.jp>2013-09-29 09:21:05 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-09-29 09:21:05 -0700
commit67beb3d0bc41c3416902c858f595b35306f76704 (patch)
tree322b88c2eb64e3a6f64d5e43ad3884596a7400a6
parent899790011304c4029e15abf410e49ce7cec17e0a (diff)
XauFileName: reset bsize when malloc failed
https://bugs.freedesktop.org/show_bug.cgi?id=69929 Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--AuFileName.c4
1 files changed, 3 insertions, 1 deletions
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);