telepathy-mission-control: McdAccount: Fix memory leak in get_parameter_of_known_type()
Alexandr Akulich
kaffeine at kemper.freedesktop.org
Sat Jul 6 22:46:19 UTC 2019
Module: telepathy-mission-control
Branch: master
Commit: 88ec1e6fe5c12075ee045e9fb7546d198cf9cd08
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=88ec1e6fe5c12075ee045e9fb7546d198cf9cd08
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 9927f08f..8009110e 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -455,10 +455,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;
}
@@ -3014,6 +3019,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