summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2023-01-16 19:00:35 +0100
committerNiels De Graef <ndegraef@redhat.com>2023-01-16 19:00:35 +0100
commitfd2fb3805a947436aa4d3f4a87958b85f8a99b71 (patch)
tree4d5039eaf12fee44f8e2b3d00df63bae3800a2cb
parent2f18e26c25eec0e669d1b0ab13c911e70b8fe63b (diff)
downloadgcr-fd2fb3805a947436aa4d3f4a87958b85f8a99b71.tar.gz
certificate: Don't leak Identifier field value
ASAN caught that we were leaking the value here. Fix it by not doing a duplicate string copy.
-rw-r--r--gcr/gcr-certificate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcr/gcr-certificate.c b/gcr/gcr-certificate.c
index 2a38efb..368a381 100644
--- a/gcr/gcr-certificate.c
+++ b/gcr/gcr-certificate.c
@@ -1056,7 +1056,7 @@ append_extension_hex (GQuark oid,
/* Extension type */
text = egg_oid_get_description (oid);
- _gcr_certificate_section_new_field (section, _("Identifier"), g_strdup (text));
+ _gcr_certificate_section_new_field (section, _("Identifier"), text);
_gcr_certificate_section_new_field_take_bytes (section, _("Value"), g_steal_pointer (&value));
return section;