[gthumb] fixed potential memory leak
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] fixed potential memory leak
- Date: Thu, 19 Aug 2010 11:28:20 +0000 (UTC)
commit a0ac91977ab67cbaf518096df666522cc2931ce3
Author: Paolo Bacchilega <paobac src gnome org>
Date: Thu Aug 19 13:27:09 2010 +0200
fixed potential memory leak
extensions/resize_images/dlg-resize-images.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/extensions/resize_images/dlg-resize-images.c b/extensions/resize_images/dlg-resize-images.c
index effc92e..992f3b5 100644
--- a/extensions/resize_images/dlg-resize-images.c
+++ b/extensions/resize_images/dlg-resize-images.c
@@ -101,10 +101,9 @@ resize_step (GthPixbufTask *pixbuf_task)
new_h = max_h;
}
- if ((new_w > 1) && (new_h > 1)) {
- _g_object_unref (pixbuf_task->dest);
+ _g_object_unref (pixbuf_task->dest);
+ if ((new_w > 1) && (new_h > 1))
pixbuf_task->dest = _gdk_pixbuf_scale_simple_safe (pixbuf_task->src, new_w, new_h, GDK_INTERP_BILINEAR);
- }
else
pixbuf_task->dest = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]