* Fixes NB#90187, frees a memory leak
authorSergio Villar Senin <svillar@igalia.com>
Thu, 16 Oct 2008 18:02:02 +0000 (18:02 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Thu, 16 Oct 2008 18:02:02 +0000 (18:02 +0000)
pmo-trunk-r6073

src/hildon2/modest-msg-edit-window.c

index 16d6157..631e0d5 100644 (file)
@@ -1008,6 +1008,8 @@ pixbuf_from_stream (TnyStream *stream, const gchar *mime_type, guint64 *stream_s
                readed = tny_stream_read (TNY_STREAM (stream), (char *) read_buffer, 128);
                size += readed;
                if (!gdk_pixbuf_loader_write (loader, read_buffer, readed, &error)) {
+                       if (error)
+                               g_error_free (error);
                        break;
                }
        }