Mercurial > emacs
changeset 56268:9853134cd610
* gtkutil.c (xg_get_image_for_pixmap): Call g_object_unref on
gpix and gmask just before return to avoid memory leak.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Mon, 28 Jun 2004 12:21:54 +0000 |
parents | d8b8139546ea |
children | 4f8b4f60e748 |
files | src/ChangeLog src/gtkutil.c |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Mon Jun 28 09:03:00 2004 +0000 +++ b/src/ChangeLog Mon Jun 28 12:21:54 2004 +0000 @@ -1,3 +1,8 @@ +2004-06-28 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * gtkutil.c (xg_get_image_for_pixmap): Call g_object_unref on + gpix and gmask just before return to avoid memory leak. + 2004-06-27 Jason Rumney <jasonr@gnu.org> * w32fns.c (file_dialog_callback): Disable edit control if set
--- a/src/gtkutil.c Mon Jun 28 09:03:00 2004 +0000 +++ b/src/gtkutil.c Mon Jun 28 12:21:54 2004 +0000 @@ -308,12 +308,9 @@ } } - g_object_unref (G_OBJECT (gmask)); g_object_unref (G_OBJECT (mask_buf)); } - g_object_unref (G_OBJECT (gpix)); - if (! old_widget) old_widget = GTK_IMAGE (gtk_image_new_from_pixbuf (icon_buf)); else @@ -322,6 +319,9 @@ g_object_unref (G_OBJECT (icon_buf)); } + g_object_unref (G_OBJECT (gpix)); + if (gmask) g_object_unref (G_OBJECT (gmask)); + return GTK_WIDGET (old_widget); }