From: Nickolay V. Shmyrev Date: Tue, 7 Apr 2009 22:16:47 +0000 (+0000) Subject: Fixes memory leak. Bug #578285. X-Git-Tag: EVINCE_2_27_1~92 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=94cadcfb95641a0aca6082fb42c8eff6ba47b878;p=evince.git Fixes memory leak. Bug #578285. 2009-04-08 Nickolay V. Shmyrev * backend/tiff/tiff2ps.c (tiff2ps_context_new): Fixes memory leak. Bug #578285. svn path=/trunk/; revision=3574 --- diff --git a/ChangeLog b/ChangeLog index 389388a9..91a7e8c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-04-08 Nickolay V. Shmyrev + + * backend/tiff/tiff2ps.c (tiff2ps_context_new): + + Fixes memory leak. Bug #578285. + 2009-04-06 Carlos Garcia Campos * libview/ev-view.[ch]: (ev_view_set_zoom), diff --git a/backend/tiff/tiff2ps.c b/backend/tiff/tiff2ps.c index 45bc5771..78f78ee8 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;