Double free in i2o_ECPublicKey

PR: 3338
This commit is contained in:
David Ramos 2014-05-03 12:00:27 +02:00 committed by Matt Caswell
parent 1ff9f2eed3
commit 7cdbce53f1

View File

@ -1419,8 +1419,11 @@ int i2o_ECPublicKey(EC_KEY *a, unsigned char **out)
*out, buf_len, NULL)) *out, buf_len, NULL))
{ {
ECerr(EC_F_I2O_ECPUBLICKEY, ERR_R_EC_LIB); ECerr(EC_F_I2O_ECPUBLICKEY, ERR_R_EC_LIB);
OPENSSL_free(*out); if (new_buffer)
*out = NULL; {
OPENSSL_free(*out);
*out = NULL;
}
return 0; return 0;
} }
if (!new_buffer) if (!new_buffer)