fix freeing stack buffer in utf8asn1str (CVE-2024-6197)

Source: Fedora 40: curl 2024-a7976ba89f Security Advisory Updates