[telepathy-mission-control-5.12] telepathy-mission-control: McdAccountManagerDefault: Fix a possible double free
Xavier Claessens
xclaesse at kemper.freedesktop.org
Wed Jul 11 03:09:44 PDT 2012
Module: telepathy-mission-control
Branch: telepathy-mission-control-5.12
Commit: 0daa22ca3858138aee10f8bf46a07fd15c1fcf49
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=0daa22ca3858138aee10f8bf46a07fd15c1fcf49
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