aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2009-04-20 01:43:45 +0800
committerLars-Peter Clausen <lars@metafoo.de>2009-04-21 16:42:14 +0800
commit5a3ccbe8b14853cf20707c2360c91f7c5289dae5 (patch)
tree4c940a47bed66478e62dec064e7b6d1997bc8bfd
parent98cea1baa922b8e1dfbd05c29751b6fc7d5651ac (diff)
downloadgsoc2013-empathy-5a3ccbe8b14853cf20707c2360c91f7c5289dae5.tar
gsoc2013-empathy-5a3ccbe8b14853cf20707c2360c91f7c5289dae5.tar.gz
gsoc2013-empathy-5a3ccbe8b14853cf20707c2360c91f7c5289dae5.tar.bz2
gsoc2013-empathy-5a3ccbe8b14853cf20707c2360c91f7c5289dae5.tar.lz
gsoc2013-empathy-5a3ccbe8b14853cf20707c2360c91f7c5289dae5.tar.xz
gsoc2013-empathy-5a3ccbe8b14853cf20707c2360c91f7c5289dae5.tar.zst
gsoc2013-empathy-5a3ccbe8b14853cf20707c2360c91f7c5289dae5.zip
Fix memleak in avatar_chooser_maybe_convert_and_scale. Unref the scaled buffer
after it has been saved and is not needed anymore.
-rw-r--r--libempathy-gtk/empathy-avatar-chooser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c
index 8c18e8cca..02aa689eb 100644
--- a/libempathy-gtk/empathy-avatar-chooser.c
+++ b/libempathy-gtk/empathy-avatar-chooser.c
@@ -529,6 +529,7 @@ avatar_chooser_maybe_convert_and_scale (EmpathyAvatarChooser *chooser,
&converted_image_size,
new_format_name,
&error, NULL);
+ g_object_unref (pixbuf_scaled);
if (!saved) {
g_free (new_format_name);
@@ -885,7 +886,7 @@ avatar_chooser_update_preview_cb (GtkFileChooser *file_chooser,
GTK_ICON_SIZE_DIALOG);
}
- g_free (filename);
+ g_free (filename);
}
gtk_file_chooser_set_preview_widget_active (file_chooser, TRUE);