]> granicus.if.org Git - openssl/commitdiff
dgram_sctp_ctrl: authkey memory leak
authorMartin Brejcha <martin.brejcha@acision.com>
Thu, 1 May 2014 10:07:09 +0000 (12:07 +0200)
committerMatt Caswell <matt@openssl.org>
Sun, 11 May 2014 23:24:59 +0000 (00:24 +0100)
PR: 3327

crypto/bio/bss_dgram.c

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