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=45bc5771821ab52470d214f2dbe3e13befe4e76d;hpb=1af6600934d1f723e5b492b8322e52a1144fb0af;p=evince.git diff --git a/backend/tiff/tiff2ps.c b/backend/tiff/tiff2ps.c index 45bc5771..43a6cb32 100644 --- a/backend/tiff/tiff2ps.c +++ b/backend/tiff/tiff2ps.c @@ -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;