summaryrefslogtreecommitdiff
path: root/test/pdf2png.c
diff options
context:
space:
mode:
authorBryce Harrington <bryce@bryceharrington.org>2018-10-17 17:51:14 -0700
committerBryce Harrington <bryce@bryceharrington.org>2018-10-17 17:53:12 -0700
commit6059f5f260935e48ad12f0865136ace63449e4bd (patch)
treed62438876b1d36b71cfa47768096b1ddd611dbb8 /test/pdf2png.c
parent3a03c1ba4bc30492721abdb6c9ec8868663ef237 (diff)
test: Free resources in pdf2png
Patch proposed by Bofa. Fixes: https://gitlab.freedesktop.org/cairo/cairo/issues/317 Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
Diffstat (limited to 'test/pdf2png.c')
-rw-r--r--test/pdf2png.c2
1 files changed, 2 insertions, 0 deletions
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");