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/dwm.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/dwm.c') diff --git a/src/dwm.c b/src/dwm.c index 87d794e..a1f1010 100644 --- a/src/dwm.c +++ b/src/dwm.c @@ -335,6 +335,7 @@ static gboolean socket_callback(GSocket *socket, GIOCondition condition, gpointe //log_debug("Received dwm ipc response: %s", reply); ipc_handle(data, msg_type, reply, reply_size); + g_free(reply); return G_SOURCE_CONTINUE; } @@ -378,6 +379,7 @@ DwmIpc *dwm_create(State *state, const char *socket) g_source_attach(dwm->source, NULL); log_info("Attached dwm ipc source [socket=%s]", socket); + g_object_unref(addr); return dwm; } @@ -433,6 +435,10 @@ void dwm_destroy(DwmIpc *dwm) g_source_destroy(dwm->source); g_source_unref(dwm->source); g_object_unref(dwm->socket); + + if (dwm->hidden_title) + button_destroy(dwm->title); + g_free(dwm); } -- cgit v1.2.3