diff options
author | deraadt <> | 2014-05-30 06:22:57 +0000 |
---|---|---|
committer | deraadt <> | 2014-05-30 06:22:57 +0000 |
commit | abd9b10898e82011a65d8e8fca56bf56532edd69 (patch) | |
tree | 1ff700d79cee9e764329e5c50d7eb8d5109789cc /src/lib/libcrypto/ec/ec_asn1.c | |
parent | 2ff11427d41a52cb126e9892413db066f8ae166a (diff) | |
download | openbsd-abd9b10898e82011a65d8e8fca56bf56532edd69.tar.gz openbsd-abd9b10898e82011a65d8e8fca56bf56532edd69.tar.bz2 openbsd-abd9b10898e82011a65d8e8fca56bf56532edd69.zip |
more: no need for null check before free
ok tedu guenther
Diffstat (limited to 'src/lib/libcrypto/ec/ec_asn1.c')
-rw-r--r-- | src/lib/libcrypto/ec/ec_asn1.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ec_asn1.c b/src/lib/libcrypto/ec/ec_asn1.c index 2409cd0886..342db2a992 100644 --- a/src/lib/libcrypto/ec/ec_asn1.c +++ b/src/lib/libcrypto/ec/ec_asn1.c | |||
@@ -805,8 +805,7 @@ ec_asn1_parameters2group(const ECPARAMETERS * params) | |||
805 | } | 805 | } |
806 | /* extract seed (optional) */ | 806 | /* extract seed (optional) */ |
807 | if (params->curve->seed != NULL) { | 807 | if (params->curve->seed != NULL) { |
808 | if (ret->seed != NULL) | 808 | free(ret->seed); |
809 | free(ret->seed); | ||
810 | if (!(ret->seed = malloc(params->curve->seed->length))) { | 809 | if (!(ret->seed = malloc(params->curve->seed->length))) { |
811 | ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, | 810 | ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, |
812 | ERR_R_MALLOC_FAILURE); | 811 | ERR_R_MALLOC_FAILURE); |