projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c46343f
)
Free the correct type in OBJ_add_object()
author
Matt Caswell
<matt@openssl.org>
Mon, 12 Mar 2018 15:24:29 +0000
(15:24 +0000)
committer
Matt Caswell
<matt@openssl.org>
Mon, 12 Mar 2018 19:53:18 +0000
(19:53 +0000)
We should be using ASN1_OBJECT_free() not OPENSSL_free().
Fixes #5568
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5599)
crypto/objects/obj_dat.c
patch
|
blob
|
history
diff --git
a/crypto/objects/obj_dat.c
b/crypto/objects/obj_dat.c
index c43d86edfbe143c893e1fb7d8a0dd72946bb7c51..315afa9dbed3e60754cd1abd1a8c07834283b6fd 100644
(file)
--- a/
crypto/objects/obj_dat.c
+++ b/
crypto/objects/obj_dat.c
@@
-305,9
+305,8
@@
int OBJ_add_object(const ASN1_OBJECT *obj)
for (i = ADDED_DATA; i <= ADDED_NID; i++)
if (ao[i] != NULL)
OPENSSL_free(ao[i]);
- if (o != NULL)
- OPENSSL_free(o);
- return (NID_undef);
+ ASN1_OBJECT_free(o);
+ return NID_undef;
}
ASN1_OBJECT *OBJ_nid2obj(int n)