From: Daiki Ueno Date: Mon, 9 Sep 2019 08:26:52 +0000 (+0200) Subject: uri: Check return value of insert_attribute X-Git-Tag: 0.23.17~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8db6d7eee38bbf1f511da6128d108a62833f84d0;p=p11-kit uri: Check return value of insert_attribute --- diff --git a/p11-kit/uri.c b/p11-kit/uri.c index 450a11e..328db19 100644 --- a/p11-kit/uri.c +++ b/p11-kit/uri.c @@ -1593,7 +1593,11 @@ parse_vendor_query (const char *name_start, const char *name_end, return P11_KIT_URI_BAD_ENCODING; } - insert_attribute (uri->qattrs, (char *)name, (char *)value); + if (!insert_attribute (uri->qattrs, (char *)name, (char *)value)) { + free (name); + free (value); + return P11_KIT_URI_UNEXPECTED; + } return 0; }