summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHodong <hodong@yozmos.com>2022-01-20 00:57:41 +0900
committerMatt Turner <mattst88@gmail.com>2022-03-24 16:50:11 +0000
commit8a368d808fec166b5fb3dfe6312aab22c7ee20af (patch)
tree36c299f57f670c68d159b8b39729429df4e40d70
parentda97120f2322882a17f14e5d7da00c1e772679e8 (diff)
downloadxorg-lib-libX11-8a368d808fec166b5fb3dfe6312aab22c7ee20af.tar.gz
Fix two memory leaks in _XFreeX11XCBStructure()
Even when XCloseDisplay() was called, some memory was leaked. XCloseDisplay() calls _XFreeDisplayStructure(), which calls _XFreeX11XCBStructure(). However, _XFreeX11XCBStructure() did not destroy the condition variables, resulting in the leaking of some 40 bytes. Signed-off-by: Hodong <hodong@yozmos.com>
-rw-r--r--src/xcb_disp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xcb_disp.c b/src/xcb_disp.c
index 70a602f4..e9becee3 100644
--- a/src/xcb_disp.c
+++ b/src/xcb_disp.c
@@ -102,6 +102,8 @@ void _XFreeX11XCBStructure(Display *dpy)
dpy->xcb->pending_requests = tmp->next;
free(tmp);
}
+ xcondition_clear(dpy->xcb->event_notify);
+ xcondition_clear(dpy->xcb->reply_notify);
xcondition_free(dpy->xcb->event_notify);
xcondition_free(dpy->xcb->reply_notify);
Xfree(dpy->xcb);