*
*/
+#include <config.h>
#include <stdio.h>
#include <stdlib.h> /* for atof */
#include <math.h>
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;