2 commits - src/cairo-pdf-interchange.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 24 21:18:09 UTC 2024
src/cairo-pdf-interchange.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 409a6b5229f84fa64107e4ce856d1664d9e76faa
Merge: bccc70439 dd40d34fe
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Mon Jun 24 21:18:07 2024 +0000
Merge branch 'master' into 'master'
Fix a memory leak
See merge request cairo/cairo!568
commit dd40d34feee126e3892bd7a24dae9e4076764376
Author: Matthias Clasen <mclasen at redhat.com>
Date: Mon Jun 24 14:16:28 2024 -0400
Fix a memory leak
Coverity flagged this minor memory leak.
diff --git a/src/cairo-pdf-interchange.c b/src/cairo-pdf-interchange.c
index f0540effb..29d5c5d9c 100644
--- a/src/cairo-pdf-interchange.c
+++ b/src/cairo-pdf-interchange.c
@@ -2831,8 +2831,10 @@ _cairo_pdf_interchange_set_custom_metadata (cairo_pdf_surface_t *surface,
if (value && strlen(value)) {
new_data.name = strdup (name);
status = _cairo_utf8_to_pdf_string (value, &s);
- if (unlikely (status))
+ if (unlikely (status)) {
+ free (new_data.name);
return status;
+ }
new_data.value = s;
status = _cairo_array_append (&ic->custom_metadata, &new_data);
}
More information about the cairo-commit
mailing list