mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-02-07 09:50:31 +01:00
daemon: fix memleak in queue_changed_property
The control of value is transferred to up_daemon_queue_changed_property, let it release the memory when an error occurs. https://bugs.freedesktop.org/show_bug.cgi?id=82659
This commit is contained in:
parent
71cbf8dfb9
commit
f3dfc1ea83
1 changed files with 3 additions and 1 deletions
|
|
@ -662,8 +662,10 @@ up_daemon_queue_changed_property (UpDaemon *daemon,
|
|||
{
|
||||
g_return_if_fail (UP_IS_DAEMON (daemon));
|
||||
|
||||
if (daemon->priv->connection == NULL)
|
||||
if (daemon->priv->connection == NULL) {
|
||||
g_variant_unref (value);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!daemon->priv->changed_props) {
|
||||
daemon->priv->changed_props = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue