Fix a small memory leak. (#403251, Felix Riemann)

2007-04-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintjob.c (gtk_print_job_get_surface): Fix a
        small memory leak.  (#403251, Felix Riemann)



svn path=/trunk/; revision=17693
This commit is contained in:
Matthias Clasen 2007-04-29 04:58:20 +00:00 committed by Matthias Clasen
parent a59a315050
commit 6f8d92f369
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2007-04-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprintjob.c (gtk_print_job_get_surface): Fix a
small memory leak. (#403251, Felix Riemann)
2007-04-29 Matthias Clasen <mclasen@redhat.com>
* modules/printbackends/cups/gtkprintbackendcups.c: Fix a

View File

@ -475,6 +475,7 @@ gtk_print_job_get_surface (GtkPrintJob *job,
&tmp_error);
if (fd == -1)
{
g_free (filename);
g_propagate_error (error, tmp_error);
return NULL;
}
@ -486,6 +487,7 @@ gtk_print_job_get_surface (GtkPrintJob *job,
if (!(gtk_debug_flags & GTK_DEBUG_PRINTING))
#endif /* G_ENABLE_DEBUG */
unlink (filename);
g_free (filename);
paper_size = gtk_page_setup_get_paper_size (priv->page_setup);
width = gtk_paper_size_get_width (paper_size, GTK_UNIT_POINTS);