mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Don't leak memory on set_reasons() error path
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>
This commit is contained in:
parent
137e5555bd
commit
723412d4d8
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user