summaryrefslogtreecommitdiff
path: root/battstat
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-03-14 08:52:34 +0100
committerraveit65 <[email protected]>2019-04-22 19:26:40 +0200
commit4b08d3116c7fc759feff92d627d45397db2446ea (patch)
tree2f7197c362bea39f2fa2c10208f08b15bfef6f29 /battstat
parentd7739895aff22ffe433578ff9f7d8b955ce50423 (diff)
downloadmate-applets-4b08d3116c7fc759feff92d627d45397db2446ea.tar.bz2
mate-applets-4b08d3116c7fc759feff92d627d45397db2446ea.tar.xz
Fix use-after-free clang warning
battstat_applet.c:755:3: warning: Use of memory after it is freed static_global_teardown (battstat); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ stickynotes.c:674:24: warning: Use of memory after it is freed stickynotes->notes = g_list_remove(stickynotes->notes, note); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Diffstat (limited to 'battstat')
-rw-r--r--battstat/battstat_applet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/battstat/battstat_applet.c b/battstat/battstat_applet.c
index bb52c7fd..dd66b4f5 100644
--- a/battstat/battstat_applet.c
+++ b/battstat/battstat_applet.c
@@ -750,9 +750,9 @@ destroy_applet( GtkWidget *widget, ProgressData *battstat )
g_object_unref( G_OBJECT(battstat->status) );
g_object_unref( G_OBJECT(battstat->percent) );
- g_free( battstat );
-
static_global_teardown (battstat);
+
+ g_free (battstat);
}
/* Common function invoked by the 'Help' context menu item and the 'Help'