Fix memory leak in GENERAL_NAME_set0_othername.

(Imported from upstream's deee898ef94a176a22fce3b9effc957cb75bb535.)

Change-Id: Ifcef31baa1f8b185c2014481ca9bb4e23fe74a53
Reviewed-on: https://boringssl-review.googlesource.com/22364
Commit-Queue: Steven Valdez <svaldez@google.com>
Reviewed-by: Steven Valdez <svaldez@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/crypto/x509v3/v3_genn.c b/crypto/x509v3/v3_genn.c
index 2331cd4..8c92687 100644
--- a/crypto/x509v3/v3_genn.c
+++ b/crypto/x509v3/v3_genn.c
@@ -231,6 +231,7 @@
     oth = OTHERNAME_new();
     if (!oth)
         return 0;
+    ASN1_TYPE_free(oth->value);
     oth->type_id = oid;
     oth->value = value;
     GENERAL_NAME_set0_value(gen, GEN_OTHERNAME, oth);