From c22bdad6245700a0ddd6a4f5522d945614e2181f Mon Sep 17 00:00:00 2001 From: Avinash Sonawane Date: Tue, 23 Mar 2021 11:56:58 +0530 Subject: [PATCH] Free memory only after last reference Found by: scan-build --- panel-plugin/netload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panel-plugin/netload.c b/panel-plugin/netload.c index 3908ef7..000a215 100644 --- a/panel-plugin/netload.c +++ b/panel-plugin/netload.c @@ -418,10 +418,10 @@ static void monitor_free(XfcePanelPlugin *plugin, t_global_monitor *global) } gtk_widget_destroy(global->tooltip_text); - - g_free(global); close_netload( &(global->monitor->data) ); + + g_free(global); }