Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x509asn1: avoid freeing unallocated pointers
When utf8asn1str fails there is no allocation returned, so freeing the return pointer in **to is at best a no-op and at worst a double- free bug waiting to happen. The current coding isn't hiding any such bugs but to future proof, avoid freeing the return value pointer iff the function failed. Closes: curl#10087 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
- Loading branch information