X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=backend%2Ftiff%2Ftiff2ps.c;h=43a6cb32a5a961a9edd7424695abaf6ffdc8425b;hb=25f996165b1bb22783c5cfd43544ab9703a0dfb5;hp=632169b1555c98d4f20b8b116cced1a99cccfc88;hpb=13a06349251874bd35d2f03c3fc93217cee749a2;p=evince.git diff --git a/backend/tiff/tiff2ps.c b/backend/tiff/tiff2ps.c index 632169b1..43a6cb32 100644 --- a/backend/tiff/tiff2ps.c +++ b/backend/tiff/tiff2ps.c @@ -32,6 +32,7 @@ * */ +#include #include #include /* for atof */ #include @@ -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;