diff options
author | Luke Yelavich <luke.yelavich@canonical.com> | 2011-02-17 11:14:11 +1100 |
---|---|---|
committer | Luke Yelavich <luke.yelavich@canonical.com> | 2011-02-17 11:14:11 +1100 |
commit | 633b340034c355a8c2883894f5c61824184a59fa (patch) | |
tree | 43bb2da8baac2f917c275c3f8de8b481db704b57 | |
parent | a8a74beaa9b5b368a037c9b2fb592a89cb43ecc0 (diff) | |
download | ayatana-indicator-messages-633b340034c355a8c2883894f5c61824184a59fa.tar.gz ayatana-indicator-messages-633b340034c355a8c2883894f5c61824184a59fa.tar.bz2 ayatana-indicator-messages-633b340034c355a8c2883894f5c61824184a59fa.zip |
Store entry data in a variable so it can be freed after signaling an
accessible description change, preventing a memory leak.
-rw-r--r-- | src/indicator-messages.c | 7 |
1 files changed, 5 insertions, 2 deletions
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; } |