telepathy-mission-control: McdAccountManagerDefault: Fix a possible double free
Xavier Claessens
xclaesse at kemper.freedesktop.org
Wed Jul 11 03:05:11 PDT 2012
Module: telepathy-mission-control
Branch: master
Commit: eff02cf76254af6b9169badcfe76cd7890a0df6b
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=eff02cf76254af6b9169badcfe76cd7890a0df6b
Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date: Mon Jul 9 12:35:01 2012 +0200
McdAccountManagerDefault: Fix a possible double free
If the account is already in the hashtable, g_hash_table_insert()
will set @removed as value, but free it since the key already in
the table is kept.
https://bugs.freedesktop.org/show_bug.cgi?id=51842
---
src/mcd-account-manager-default.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mcd-account-manager-default.c b/src/mcd-account-manager-default.c
index deae163..e156de1 100644
--- a/src/mcd-account-manager-default.c
+++ b/src/mcd-account-manager-default.c
@@ -77,7 +77,7 @@ _delete_from_keyring (const McpAccountStorage *self,
{
/* flag the whole account as purged */
gchar *removed = g_strdup (account);
- g_hash_table_insert (amd->removed_accounts, removed, removed);
+ g_hash_table_replace (amd->removed_accounts, removed, removed);
}
else
{
More information about the telepathy-commits
mailing list