]> www.fi.muni.cz Git - evince.git/commitdiff
Fixes memory leak. Bug #578285.
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>
Tue, 7 Apr 2009 22:20:19 +0000 (22:20 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Tue, 7 Apr 2009 22:20:19 +0000 (22:20 +0000)
2009-04-08  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>

* backend/tiff/tiff2ps.c (tiff2ps_context_new):

Fixes memory leak. Bug #578285.

svn path=/branches/gnome-2-26/; revision=3576

ChangeLog
backend/tiff/tiff2ps.c

index f8fc2b9f6c6504c7f3279e304d0bb752a638cb75..ebe8c3732d63105de027aad85accd50cb3aea571 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-08  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * backend/tiff/tiff2ps.c (tiff2ps_context_new):
+       
+       Fixes memory leak. Bug #578285.
+
 2009-04-01  Christian Persch  <chpe@gnome.org>
 
        * data/evince.desktop.in.in: Direct bug-buddy bugs to the
index 45bc5771821ab52470d214f2dbe3e13befe4e76d..43a6cb32a5a961a9edd7424695abaf6ffdc8425b 100644 (file)
@@ -173,8 +173,11 @@ TIFF2PSContext* tiff2ps_context_new(const gchar *filename) {
        ctx = g_new0(TIFF2PSContext, 1);
        ctx->filename = g_strdup(filename);
        ctx->fd = g_fopen(ctx->filename, "w");
-       if (ctx->fd == NULL)
+       if (ctx->fd == NULL) {
+               g_free (ctx->filename);
+               g_free (ctx);
                return NULL;
+       }
        ctx->interpolate = TRUE;     /* interpolate level2 image */
        ctx->PSavoiddeadzone = TRUE; /* enable avoiding printer deadzone */
        return ctx;