[cairo-commit] test/pdf2png.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 18 00:54:18 UTC 2018


 test/pdf2png.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 6059f5f260935e48ad12f0865136ace63449e4bd
Author: Bryce Harrington <bryce at bryceharrington.org>
Date:   Wed Oct 17 17:51:14 2018 -0700

    test: Free resources in pdf2png
    
    Patch proposed by Bofa.
    
    Fixes: https://gitlab.freedesktop.org/cairo/cairo/issues/317
    Reviewed-by: Bryce Harrington <bryce at bryceharrington.org>

diff --git a/test/pdf2png.c b/test/pdf2png.c
index 23691221e..ab39c5736 100644
--- a/test/pdf2png.c
+++ b/test/pdf2png.c
@@ -67,10 +67,12 @@ int main (int argc, char *argv[])
 	FAIL (error->message);
 
     document = poppler_document_new_from_file (uri, NULL, &error);
+    g_free (uri);
     if (document == NULL)
 	FAIL (error->message);
 
     page = poppler_document_get_page_by_label (document, page_label);
+    g_object_unref (document);
     if (page == NULL)
 	FAIL ("page not found");
 


More information about the cairo-commit mailing list