Chromium Code Reviews

Unified Diff: views/controls/menu/native_menu_gtk.cc

Issue 1075014: Linux: Fix some GdkPixbuf leaks. (Closed)
Patch Set: move BrowserThemeProvider comment to the public functions Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « tools/heapcheck/suppressions.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/native_menu_gtk.cc
diff --git a/views/controls/menu/native_menu_gtk.cc b/views/controls/menu/native_menu_gtk.cc
index 395e9a5f182e6f2e1342cb73dcebc10fe5a50846..f551ed6d9fc52cdc12162da626c18e31e282ceac 100644
--- a/views/controls/menu/native_menu_gtk.cc
+++ b/views/controls/menu/native_menu_gtk.cc
@@ -224,6 +224,7 @@ GtkWidget* NativeMenuGtk::AddMenuItemAt(int index,
GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(&icon);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),
gtk_image_new_from_pixbuf(pixbuf));
+ g_object_unref(pixbuf);
} else {
menu_item = gtk_menu_item_new_with_mnemonic(label.c_str());
}
« no previous file with comments | « tools/heapcheck/suppressions.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine