[Pkg-telepathy-commits] [empathy] 29/39: menu_removed_cb: fix 'name' leak
Simon McVittie
smcv at debian.org
Wed Jan 29 12:53:14 UTC 2014
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian
in repository empathy.
commit 1d8e6474075b44fdf6ae9e11b0e7e3b9578d159e
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Wed Sep 11 16:27:04 2013 +0200
menu_removed_cb: fix 'name' leak
https://bugzilla.gnome.org/show_bug.cgi?id=707885
---
src/empathy-roster-window.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c
index 5b4e987..cd1aabb 100644
--- a/src/empathy-roster-window.c
+++ b/src/empathy-roster-window.c
@@ -1347,16 +1347,22 @@ roster_window_favorite_chatroom_menu_removed_cb (
for (i = 0; i < n; i++)
{
- const gchar *name;
+ gchar *name;
- if (g_menu_model_get_item_attribute (
- G_MENU_MODEL (self->priv->rooms_section), i, "room-name",
- "s", &name)
- && !tp_strdiff (name, empathy_chatroom_get_name (chatroom)))
+ if (!g_menu_model_get_item_attribute (
+ G_MENU_MODEL (self->priv->rooms_section), i,
+ "room-name", "s", &name))
+ continue;
+
+ if (tp_strdiff (name, empathy_chatroom_get_name (chatroom)))
{
- g_menu_remove (self->priv->rooms_section, i);
- break;
+ g_free (name);
+ continue;
}
+
+ g_menu_remove (self->priv->rooms_section, i);
+ g_free (name);
+ break;
}
chatrooms = empathy_chatroom_manager_get_chatrooms (
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/empathy.git
More information about the Pkg-telepathy-commits
mailing list