Commit 98e4c100 authored by Matt Caswell's avatar Matt Caswell
Browse files

Free the correct type in OBJ_add_object()



We should be using ASN1_OBJECT_free() not OPENSSL_free().

Fixes #5568

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5598)
parent 7e454ca3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -213,8 +213,8 @@ int OBJ_add_object(const ASN1_OBJECT *obj)
 err:
    for (i = ADDED_DATA; i <= ADDED_NID; i++)
        OPENSSL_free(ao[i]);
    OPENSSL_free(o);
    return (NID_undef);
    ASN1_OBJECT_free(o);
    return NID_undef;
}

ASN1_OBJECT *OBJ_nid2obj(int n)