diff options
author | deraadt <> | 2014-05-30 06:24:17 +0000 |
---|---|---|
committer | deraadt <> | 2014-05-30 06:24:17 +0000 |
commit | fa03bdcd17251bec54215a778d2e211e7517a8d7 (patch) | |
tree | 378f1ca33779c5e85714a5e4979113c540782fad /src | |
parent | abd9b10898e82011a65d8e8fca56bf56532edd69 (diff) | |
download | openbsd-fa03bdcd17251bec54215a778d2e211e7517a8d7.tar.gz openbsd-fa03bdcd17251bec54215a778d2e211e7517a8d7.tar.bz2 openbsd-fa03bdcd17251bec54215a778d2e211e7517a8d7.zip |
more: no need to null check before free; ok guenther
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/dh/dh_ameth.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_ameth.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_ameth.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_oaep.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/dh/dh_ameth.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/dsa/dsa_ameth.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/rsa/rsa_ameth.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/rsa/rsa_oaep.c | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/dh/dh_ameth.c b/src/lib/libcrypto/dh/dh_ameth.c index 119ac615a6..fe3dfc40d1 100644 --- a/src/lib/libcrypto/dh/dh_ameth.c +++ b/src/lib/libcrypto/dh/dh_ameth.c | |||
@@ -382,7 +382,7 @@ static int do_dh_print(BIO *bp, const DH *x, int indent, | |||
382 | err: | 382 | err: |
383 | DHerr(DH_F_DO_DH_PRINT,reason); | 383 | DHerr(DH_F_DO_DH_PRINT,reason); |
384 | } | 384 | } |
385 | if (m != NULL) free(m); | 385 | free(m); |
386 | return(ret); | 386 | return(ret); |
387 | } | 387 | } |
388 | 388 | ||
diff --git a/src/lib/libcrypto/dsa/dsa_ameth.c b/src/lib/libcrypto/dsa/dsa_ameth.c index e2c3980e56..c6d04f6a5d 100644 --- a/src/lib/libcrypto/dsa/dsa_ameth.c +++ b/src/lib/libcrypto/dsa/dsa_ameth.c | |||
@@ -481,7 +481,7 @@ static int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype) | |||
481 | if (!ASN1_bn_print(bp,"G: ",x->g,m,off)) goto err; | 481 | if (!ASN1_bn_print(bp,"G: ",x->g,m,off)) goto err; |
482 | ret=1; | 482 | ret=1; |
483 | err: | 483 | err: |
484 | if (m != NULL) free(m); | 484 | free(m); |
485 | return(ret); | 485 | return(ret); |
486 | } | 486 | } |
487 | 487 | ||
diff --git a/src/lib/libcrypto/rsa/rsa_ameth.c b/src/lib/libcrypto/rsa/rsa_ameth.c index f0a346a70e..2c7e39bb1d 100644 --- a/src/lib/libcrypto/rsa/rsa_ameth.c +++ b/src/lib/libcrypto/rsa/rsa_ameth.c | |||
@@ -248,7 +248,7 @@ static int do_rsa_print(BIO *bp, const RSA *x, int off, int priv) | |||
248 | } | 248 | } |
249 | ret=1; | 249 | ret=1; |
250 | err: | 250 | err: |
251 | if (m != NULL) free(m); | 251 | free(m); |
252 | return(ret); | 252 | return(ret); |
253 | } | 253 | } |
254 | 254 | ||
diff --git a/src/lib/libcrypto/rsa/rsa_oaep.c b/src/lib/libcrypto/rsa/rsa_oaep.c index a107e89b81..53d35621a3 100644 --- a/src/lib/libcrypto/rsa/rsa_oaep.c +++ b/src/lib/libcrypto/rsa/rsa_oaep.c | |||
@@ -179,7 +179,7 @@ decoding_err: | |||
179 | /* to avoid chosen ciphertext attacks, the error message should not reveal | 179 | /* to avoid chosen ciphertext attacks, the error message should not reveal |
180 | * which kind of decoding error happened */ | 180 | * which kind of decoding error happened */ |
181 | RSAerr(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP, RSA_R_OAEP_DECODING_ERROR); | 181 | RSAerr(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP, RSA_R_OAEP_DECODING_ERROR); |
182 | if (db != NULL) free(db); | 182 | free(db); |
183 | return -1; | 183 | return -1; |
184 | } | 184 | } |
185 | 185 | ||
diff --git a/src/lib/libssl/src/crypto/dh/dh_ameth.c b/src/lib/libssl/src/crypto/dh/dh_ameth.c index 119ac615a6..fe3dfc40d1 100644 --- a/src/lib/libssl/src/crypto/dh/dh_ameth.c +++ b/src/lib/libssl/src/crypto/dh/dh_ameth.c | |||
@@ -382,7 +382,7 @@ static int do_dh_print(BIO *bp, const DH *x, int indent, | |||
382 | err: | 382 | err: |
383 | DHerr(DH_F_DO_DH_PRINT,reason); | 383 | DHerr(DH_F_DO_DH_PRINT,reason); |
384 | } | 384 | } |
385 | if (m != NULL) free(m); | 385 | free(m); |
386 | return(ret); | 386 | return(ret); |
387 | } | 387 | } |
388 | 388 | ||
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_ameth.c b/src/lib/libssl/src/crypto/dsa/dsa_ameth.c index e2c3980e56..c6d04f6a5d 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_ameth.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_ameth.c | |||
@@ -481,7 +481,7 @@ static int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype) | |||
481 | if (!ASN1_bn_print(bp,"G: ",x->g,m,off)) goto err; | 481 | if (!ASN1_bn_print(bp,"G: ",x->g,m,off)) goto err; |
482 | ret=1; | 482 | ret=1; |
483 | err: | 483 | err: |
484 | if (m != NULL) free(m); | 484 | free(m); |
485 | return(ret); | 485 | return(ret); |
486 | } | 486 | } |
487 | 487 | ||
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_ameth.c b/src/lib/libssl/src/crypto/rsa/rsa_ameth.c index f0a346a70e..2c7e39bb1d 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_ameth.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_ameth.c | |||
@@ -248,7 +248,7 @@ static int do_rsa_print(BIO *bp, const RSA *x, int off, int priv) | |||
248 | } | 248 | } |
249 | ret=1; | 249 | ret=1; |
250 | err: | 250 | err: |
251 | if (m != NULL) free(m); | 251 | free(m); |
252 | return(ret); | 252 | return(ret); |
253 | } | 253 | } |
254 | 254 | ||
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_oaep.c b/src/lib/libssl/src/crypto/rsa/rsa_oaep.c index a107e89b81..53d35621a3 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_oaep.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_oaep.c | |||
@@ -179,7 +179,7 @@ decoding_err: | |||
179 | /* to avoid chosen ciphertext attacks, the error message should not reveal | 179 | /* to avoid chosen ciphertext attacks, the error message should not reveal |
180 | * which kind of decoding error happened */ | 180 | * which kind of decoding error happened */ |
181 | RSAerr(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP, RSA_R_OAEP_DECODING_ERROR); | 181 | RSAerr(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP, RSA_R_OAEP_DECODING_ERROR); |
182 | if (db != NULL) free(db); | 182 | free(db); |
183 | return -1; | 183 | return -1; |
184 | } | 184 | } |
185 | 185 | ||