evince r3576 - in branches/gnome-2-26: . backend/tiff



Author: nshmyrev
Date: Tue Apr  7 22:20:19 2009
New Revision: 3576
URL: http://svn.gnome.org/viewvc/evince?rev=3576&view=rev

Log:
2009-04-08  Nickolay V. Shmyrev  <nshmyrev yandex ru>

	* backend/tiff/tiff2ps.c (tiff2ps_context_new):
	
	Fixes memory leak. Bug #578285.



Modified:
   branches/gnome-2-26/ChangeLog
   branches/gnome-2-26/backend/tiff/tiff2ps.c

Modified: branches/gnome-2-26/backend/tiff/tiff2ps.c
==============================================================================
--- branches/gnome-2-26/backend/tiff/tiff2ps.c	(original)
+++ branches/gnome-2-26/backend/tiff/tiff2ps.c	Tue Apr  7 22:20:19 2009
@@ -173,8 +173,11 @@
 	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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]