Fix memory leak
authorKurt Roeckx <kurt@roeckx.be>
Sat, 21 Feb 2015 13:51:50 +0000 (14:51 +0100)
committerKurt Roeckx <kurt@roeckx.be>
Sun, 22 Feb 2015 12:18:24 +0000 (13:18 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/dh/dh_ameth.c

index b5c9c24303b042a7fd2f30c647afdebfb18f5745..14d291f3097a0e4e76576aade216f77a851c335a 100644 (file)
@@ -248,6 +248,7 @@ static int dh_priv_decode(EVP_PKEY *pkey, PKCS8_PRIV_KEY_INFO *p8)
     DHerr(DH_F_DH_PRIV_DECODE, EVP_R_DECODE_ERROR);
  dherr:
     DH_free(dh);
+    ASN1_INTEGER_free(privkey);
     return 0;
 }