[cairo-commit] cairo/src cairo-pdf-surface.c,1.50,1.51

Carl Worth commit at pdx.freedesktop.org
Thu Jul 14 17:52:19 PDT 2005


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv13378/src

Modified Files:
	cairo-pdf-surface.c 
Log Message:

        * src/cairo-pdf-surface.c: (_cairo_pdf_surface_finish),
        (_cairo_pdf_document_finish): Call _cairo_array_fini on the
        several array objects to patch memory leaks.


Index: cairo-pdf-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-pdf-surface.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- cairo-pdf-surface.c	13 Jul 2005 18:01:25 -0000	1.50
+++ cairo-pdf-surface.c	15 Jul 2005 00:52:17 -0000	1.51
@@ -485,6 +485,12 @@
 
     _cairo_pdf_document_destroy (document);
 
+    _cairo_array_fini (&surface->streams);
+    _cairo_array_fini (&surface->patterns);
+    _cairo_array_fini (&surface->xobjects);
+    _cairo_array_fini (&surface->alphas);
+    _cairo_array_fini (&surface->fonts);
+
     return status;
 }
 
@@ -1688,6 +1694,10 @@
     status = _cairo_output_stream_get_status (output);
     _cairo_output_stream_destroy (output);
 
+    _cairo_array_fini (&document->objects);
+    _cairo_array_fini (&document->pages);
+    _cairo_array_fini (&document->fonts);
+
     document->finished = TRUE;
 
     return status;




More information about the cairo-commit mailing list