diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-08-25 16:11:41 +0200 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-08-25 16:11:41 +0200 |
commit | d79f11b267f7aebf3d306f7cf7a980a4070881a7 (patch) | |
tree | ef09ff6bc2cb9924196fe23df03f4ff3efa2157b | |
parent | 4376e3e3650b18b421b53f2d441f7e74cabb70f1 (diff) | |
download | ayatana-indicator-messages-d79f11b267f7aebf3d306f7cf7a980a4070881a7.tar.gz ayatana-indicator-messages-d79f11b267f7aebf3d306f7cf7a980a4070881a7.tar.bz2 ayatana-indicator-messages-d79f11b267f7aebf3d306f7cf7a980a4070881a7.zip |
Fix a memory leak and potential crash: ref_sink the widget, not the GMenu
-rw-r--r-- | src/indicator-messages.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/indicator-messages.c b/src/indicator-messages.c index b3166f5..f211ff8 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -118,8 +118,9 @@ indicator_messages_init (IndicatorMessages *self) g_signal_connect (self->service, "connection-change", G_CALLBACK (service_connection_changed), self); - self->menu_wrapper = g_object_ref_sink (g_menu_new ()); + self->menu_wrapper = g_menu_new (); self->gtkmenu = gtk_menu_new_from_model (G_MENU_MODEL (self->menu_wrapper)); + g_object_ref_sink (self->gtkmenu); self->image = g_object_ref_sink (gtk_image_new ()); |