telepathy-mission-control: McdAccount: Fix memory leak in get_parameter_of_known_type()
Alexandr Akulich
kaffeine at kemper.freedesktop.org
Sun Oct 27 16:01:08 UTC 2019
Module: telepathy-mission-control
Branch: master
Commit: 8d2b3cc9c978b079f74032717532165c65b321cb
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=8d2b3cc9c978b079f74032717532165c65b321cb
Author: Alexander Akulich <akulichalexander at gmail.com>
Date: Sat Jul 6 15:38:31 2019 +0300
McdAccount: Fix memory leak in get_parameter_of_known_type()
Based on a commit by Slava Monich <slava.monich at jolla.com>
---
src/mcd-account.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mcd-account.c b/src/mcd-account.c
index e7f5007d..f02c80d2 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -450,10 +450,15 @@ mcd_account_get_parameter_of_known_type (McdAccount *account,
{
memcpy (parameter, &tmp, sizeof (tmp));
}
+ else
+ {
+ g_value_unset (&tmp);
+ }
return TRUE;
}
+ g_value_unset (&tmp);
return FALSE;
}
@@ -3305,6 +3310,7 @@ finally:
g_free (new_dir);
g_free (contents);
g_free (old_file);
+ g_free (old_dir);
}
static gboolean
More information about the telepathy-commits
mailing list