Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>2009-04-07 22:16:47 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2009-04-07 22:16:47 (GMT)
commit94cadcfb95641a0aca6082fb42c8eff6ba47b878 (patch)
treef4813fe7eef87be69ee45b7e2f3fa6354d9728e9 /backend
parent8a6f3e4fd0e85ea95564610a27514aa9d6c737b3 (diff)
Fixes memory leak. Bug #578285.
2009-04-08 Nickolay V. Shmyrev <nshmyrev@yandex.ru> * backend/tiff/tiff2ps.c (tiff2ps_context_new): Fixes memory leak. Bug #578285. svn path=/trunk/; revision=3574
Diffstat (limited to 'backend')
-rw-r--r--backend/tiff/tiff2ps.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/backend/tiff/tiff2ps.c b/backend/tiff/tiff2ps.c
index 45bc577..78f78ee 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 (filename);
+ g_free (ctx);
return NULL;
+ }
ctx->interpolate = TRUE; /* interpolate level2 image */
ctx->PSavoiddeadzone = TRUE; /* enable avoiding printer deadzone */
return ctx;