summaryrefslogtreecommitdiff
path: root/src/cairo-tag-attributes.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2017-11-26 13:03:18 +1030
committerAdrian Johnson <ajohnson@redneon.com>2017-11-26 13:03:18 +1030
commita709197121c8e405c2dd99e408ee3046ccf50a6a (patch)
tree08817bf70e6309aa0c98f2504431929bd2343c42 /src/cairo-tag-attributes.c
parent17e2abc992b012ac3dceb2f66fba17d312ae6d77 (diff)
downloadcairo-a709197121c8e405c2dd99e408ee3046ccf50a6a.tar.gz
pdf: fix some annotation bugs
- each annotation was emitted on every page instead of just the page that contains the annotation - the document structure did not correctly link to annotation objects - fix some annotation related memory leaks
Diffstat (limited to 'src/cairo-tag-attributes.c')
-rw-r--r--src/cairo-tag-attributes.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cairo-tag-attributes.c b/src/cairo-tag-attributes.c
index 05902b9c3..91cd5aebf 100644
--- a/src/cairo-tag-attributes.c
+++ b/src/cairo-tag-attributes.c
@@ -432,6 +432,8 @@ parse_attributes (const char *attributes, attribute_spec_t *attrib_def, cairo_li
fail2:
_cairo_array_fini (&attrib->array);
+ if (attrib->type == ATTRIBUTE_STRING)
+ free (attrib->scalar.s);
free (attrib);
fail1:
free (name);
@@ -449,6 +451,8 @@ free_attributes_list (cairo_list_t *list)
cairo_list_del (&attr->link);
free (attr->name);
_cairo_array_fini (&attr->array);
+ if (attr->type == ATTRIBUTE_STRING)
+ free (attr->scalar.s);
free (attr);
}
}