AntiPattern

Caller-Ownership Double Free

caller-ownership-double-free

ASN1 objects allocated and owned by the caller get freed inside error paths, so later cleanup frees the same pointer again; this mismatch causes double-free crashes or exploitable memory corruption during certificate SAN encoding failures.