mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-20 16:20:09 +01:00
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>
This commit is contained in:
parent
3a03c1ba4b
commit
6059f5f260
1 changed files with 2 additions and 0 deletions
|
|
@ -67,10 +67,12 @@ int main (int argc, char *argv[])
|
||||||
FAIL (error->message);
|
FAIL (error->message);
|
||||||
|
|
||||||
document = poppler_document_new_from_file (uri, NULL, &error);
|
document = poppler_document_new_from_file (uri, NULL, &error);
|
||||||
|
g_free (uri);
|
||||||
if (document == NULL)
|
if (document == NULL)
|
||||||
FAIL (error->message);
|
FAIL (error->message);
|
||||||
|
|
||||||
page = poppler_document_get_page_by_label (document, page_label);
|
page = poppler_document_get_page_by_label (document, page_label);
|
||||||
|
g_object_unref (document);
|
||||||
if (page == NULL)
|
if (page == NULL)
|
||||||
FAIL ("page not found");
|
FAIL ("page not found");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue