dgram_sctp_ctrl: authkey memory leak

PR: 3327
This commit is contained in:
Martin Brejcha 2014-05-01 12:07:09 +02:00 committed by Matt Caswell
parent 308505b838
commit 00f3a236e0

View File

@ -1447,6 +1447,7 @@ static long dgram_sctp_ctrl(BIO *b, int cmd, long num, void *ptr)
memcpy(&authkey->sca_key[0], ptr, 64 * sizeof(uint8_t)); memcpy(&authkey->sca_key[0], ptr, 64 * sizeof(uint8_t));
ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_AUTH_KEY, authkey, sockopt_len); ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_AUTH_KEY, authkey, sockopt_len);
OPENSSL_free(authkey);
if (ret < 0) break; if (ret < 0) break;
/* Reset active key */ /* Reset active key */