mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-06 02:18:06 +02:00
Don't try to destroy NULL condition variables
This avoids a segfault during error-unwinding if an invalid display name
is passed to XOpenDisplay().
Fixes: 8a368d80 "Fix two memory leaks in _XFreeX11XCBStructure()"
Resolves: #155
Signed-off-by: Simon McVittie <smcv@debian.org>
This commit is contained in:
parent
80b30d1251
commit
76d1cc3c1c
1 changed files with 4 additions and 2 deletions
|
|
@ -102,8 +102,10 @@ void _XFreeX11XCBStructure(Display *dpy)
|
|||
dpy->xcb->pending_requests = tmp->next;
|
||||
free(tmp);
|
||||
}
|
||||
xcondition_clear(dpy->xcb->event_notify);
|
||||
xcondition_clear(dpy->xcb->reply_notify);
|
||||
if (dpy->xcb->event_notify)
|
||||
xcondition_clear(dpy->xcb->event_notify);
|
||||
if (dpy->xcb->reply_notify)
|
||||
xcondition_clear(dpy->xcb->reply_notify);
|
||||
xcondition_free(dpy->xcb->event_notify);
|
||||
xcondition_free(dpy->xcb->reply_notify);
|
||||
Xfree(dpy->xcb);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue