diff options
author | Alban Crequy <alban.crequy@collabora.co.uk> | 2008-11-27 18:46:55 +0000 |
---|---|---|
committer | Alban Crequy <alban.crequy@collabora.co.uk> | 2008-11-27 18:46:55 +0000 |
commit | 67cc69eb1f3f41e628a7f1db78ece7043de1e648 (patch) | |
tree | 846ebfc6e9d8e66b5b1c93863e1fd5cf8998b17c /src/roster.c | |
parent | 99d02aca906087861dfab9dd4dde252957d53386 (diff) |
GabbleRoster: fix double free on Disconnect
Diffstat (limited to 'src/roster.c')
-rw-r--r-- | src/roster.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/roster.c b/src/roster.c index 2f95bb39c..114e42b7e 100644 --- a/src/roster.c +++ b/src/roster.c @@ -1694,16 +1694,21 @@ gabble_roster_close_all (GabbleRoster *self) self->priv->status_changed_id = 0; } + /* Use a temporary variable because we don't want + * roster_channel_closed_cb to remove the channel from the hash table a + * second time */ if (priv->group_channels != NULL) { - g_hash_table_destroy (priv->group_channels); + GHashTable *t = priv->group_channels; priv->group_channels = NULL; + g_hash_table_destroy (t); } if (priv->list_channels != NULL) { - g_hash_table_destroy (priv->list_channels); + GHashTable *t = priv->list_channels; priv->list_channels = NULL; + g_hash_table_destroy (t); } if (self->priv->iq_cb != NULL) |