aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2023-08-04 15:19:35 +0200
committerRobert Tari <robert@tari.in>2023-08-04 15:19:35 +0200
commit225638336336d34e4357de264258cce0e80e5f30 (patch)
tree7d57a9a0d06428c9ad1f20044cf861ec3af9aea1 /src
parent7ae615525e9bc3ba27bd1c6311a05b03b3f2db26 (diff)
downloadayatana-indicator-power-225638336336d34e4357de264258cce0e80e5f30.tar.gz
ayatana-indicator-power-225638336336d34e4357de264258cce0e80e5f30.tar.bz2
ayatana-indicator-power-225638336336d34e4357de264258cce0e80e5f30.zip
src/notifier.c: Do not access freed variable
Diffstat (limited to 'src')
-rw-r--r--src/notifier.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/notifier.c b/src/notifier.c
index c513656..0a56b6b 100644
--- a/src/notifier.c
+++ b/src/notifier.c
@@ -1,6 +1,6 @@
/*
* Copyright 2014-2016 Canonical Ltd.
- * Copyright 2021-2022 Robert Tari
+ * Copyright 2021-2023 Robert Tari
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3, as published
@@ -309,7 +309,6 @@ notification_show(IndicatorPowerNotifier * self)
icon_name = NULL;
nn = notify_notification_new(title, body, icon_name);
g_strfreev (icon_names);
- g_free (body);
if (are_actions_supported(self))
{
@@ -355,6 +354,8 @@ notification_show(IndicatorPowerNotifier * self)
g_error_free(error);
g_object_unref(nn);
}
+
+ g_free (body);
}
/***