diff options
author | tb <> | 2023-05-02 10:44:20 +0000 |
---|---|---|
committer | tb <> | 2023-05-02 10:44:20 +0000 |
commit | 0c2b5d8c7195556662911ad650610f9cf0164fa8 (patch) | |
tree | bff570a803b53b612e29fceb650a163df818966a /src/lib/libc/stdlib/malloc.c | |
parent | 1a9695cb54834ca3da0b7428227de4eafbb0b307 (diff) | |
download | openbsd-0c2b5d8c7195556662911ad650610f9cf0164fa8.tar.gz openbsd-0c2b5d8c7195556662911ad650610f9cf0164fa8.tar.bz2 openbsd-0c2b5d8c7195556662911ad650610f9cf0164fa8.zip |
Simplify EC_GROUP_new_by_curve_name()
Pull the setting of the name a.k.a. nid into ec_group_new_from_data().
This way, we can return early on finding the nid in the curve_list[].
This also avoids a silly bug where a bogus ERR_R_UNKNOWN_BUG is pushed
onto the error stack when ec_group_new_from_data() failed.
While there rework the exit path of ec_group_new_from_data() a bit.
Instead of an ok variable we can use an additional pointer to keep
track of the return value and free the EC_GROUP unconditionally.
ok jsing
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions