From 15baf349fa6985262da39b70f2d496af104c478d Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Sat, 16 Mar 2024 02:11:10 +0100 Subject: Fix some memory leaks and add valgrind support --- src/window.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/window.c') diff --git a/src/window.c b/src/window.c index 360f0d5..87779ea 100644 --- a/src/window.c +++ b/src/window.c @@ -30,7 +30,7 @@ static xcb_atom_t intern_atom(Window *win, const char *atom) static void wm_set_size(Window *win) { - xcb_size_hints_t hints; + xcb_size_hints_t hints = { 0 }; xcb_icccm_size_hints_set_size(&hints, false, win->width, win->height); xcb_icccm_size_hints_set_min_size(&hints, win->width, win->height); xcb_icccm_size_hints_set_max_size(&hints, win->width, win->height); @@ -38,7 +38,7 @@ static void wm_set_size(Window *win) xcb_icccm_size_hints_set_position(&hints, false, win->x, win->y); xcb_icccm_set_wm_size_hints(win->con->connection, win->window, XCB_ATOM_WM_NORMAL_HINTS, &hints); - log_debug("Xcb icccm updated size hints"); + log_debug("Xcb icccm size hints updated"); } static void wm_set_struts(Window *win) @@ -293,7 +293,6 @@ void window_destroy(Window *win) { cairo_destroy(win->cr); cairo_surface_destroy(win->surface); - g_free(win); } -- cgit v1.2.3