]> www.fi.muni.cz Git - evince.git/blobdiff - backend/tiff/tiff2ps.c
help: added Vietnamese manual
[evince.git] / backend / tiff / tiff2ps.c
index 632169b1555c98d4f20b8b116cced1a99cccfc88..43a6cb32a5a961a9edd7424695abaf6ffdc8425b 100644 (file)
@@ -32,6 +32,7 @@
  *
  */
 
+#include <config.h>
 #include <stdio.h>
 #include <stdlib.h>                    /* for atof */
 #include <math.h>
@@ -172,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;