Initialise ctx to NULL to avoid uninitialized free, noticed by
authorMark J. Cox <mark@openssl.org>
Fri, 29 Sep 2006 08:21:41 +0000 (08:21 +0000)
committerMark J. Cox <mark@openssl.org>
Fri, 29 Sep 2006 08:21:41 +0000 (08:21 +0000)
Steve Kiernan

crypto/dh/dh_key.c

index cb5abdcf47c4a18fd1d15d7d08d7c0f3801617f6..37a2c1bca23f4d7a4810a786146132ef48add7e8 100644 (file)
@@ -173,7 +173,7 @@ err:
 
 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
        {
-       BN_CTX *ctx;
+       BN_CTX *ctx=NULL;
        BN_MONT_CTX *mont=NULL;
        BIGNUM *tmp;
        int ret= -1;