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:
137e555
)
Don't leak memory on set_reasons() error path
author
Matt Caswell
<matt@openssl.org>
Thu, 28 Apr 2016 13:00:10 +0000
(14:00 +0100)
committer
Matt Caswell
<matt@openssl.org>
Wed, 1 Jun 2016 17:00:53 +0000
(18:00 +0100)
The set_reasons() function in v3_crld.c leaks a STACK_OF(CONF_VALUE)
object on an error path.
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/x509v3/v3_crld.c
patch
|
blob
|
history
diff --git
a/crypto/x509v3/v3_crld.c
b/crypto/x509v3/v3_crld.c
index 221eedfaeb9dd508c1a403f158e9f9492451b5a2..c4c77f185109906ed88b55bb95f4dbe8d9d32d43 100644
(file)
--- a/
crypto/x509v3/v3_crld.c
+++ b/
crypto/x509v3/v3_crld.c
@@
-150,10
+150,10
@@
static int set_reasons(ASN1_BIT_STRING **preas, char *value)
const char *bnam;
int i, ret = 0;
rsk = X509V3_parse_list(value);
- if (!rsk)
- return 0;
- if (*preas)
+ if (rsk == NULL)
return 0;
+ if (*preas != NULL)
+ goto err;
for (i = 0; i < sk_CONF_VALUE_num(rsk); i++) {
bnam = sk_CONF_VALUE_value(rsk, i)->name;
if (*preas == NULL) {