From 633b340034c355a8c2883894f5c61824184a59fa Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Thu, 17 Feb 2011 11:14:11 +1100 Subject: Store entry data in a variable so it can be freed after signaling an accessible description change, preventing a memory leak. --- src/indicator-messages.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/indicator-messages.c') diff --git a/src/indicator-messages.c b/src/indicator-messages.c index 77a7b70..9c57856 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -94,12 +94,15 @@ static void update_a11y_desc (void) { g_return_if_fail(IS_INDICATOR_MESSAGES(indicator)); + GList *entry = indicator_object_get_entries(indicator); g_signal_emit(G_OBJECT(indicator), INDICATOR_OBJECT_SIGNAL_ACCESSIBLE_DESC_UPDATE_ID, - 0, - (IndicatorObjectEntry *)indicator_object_get_entries(indicator)->data, + 0, + entry->data, TRUE); + g_list_free(entry); + return; } -- cgit v1.2.3