Skip to content

Commit 6059f5f

Browse files
test: Free resources in pdf2png
Patch proposed by Bofa. Fixes: https://gitlab.freedesktop.org/cairo/cairo/issues/317 Reviewed-by: Bryce Harrington <[email protected]>
1 parent 3a03c1b commit 6059f5f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/pdf2png.c

+2
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,12 @@ int main (int argc, char *argv[])
6767
FAIL (error->message);
6868

6969
document = poppler_document_new_from_file (uri, NULL, &error);
70+
g_free (uri);
7071
if (document == NULL)
7172
FAIL (error->message);
7273

7374
page = poppler_document_get_page_by_label (document, page_label);
75+
g_object_unref (document);
7476
if (page == NULL)
7577
FAIL ("page not found");
7678

0 commit comments

Comments
 (0)