summaryrefslogtreecommitdiff
path: root/lib/libcrypto/ec/ec_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/ec/ec_lib.c')
-rw-r--r--lib/libcrypto/ec/ec_lib.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/libcrypto/ec/ec_lib.c b/lib/libcrypto/ec/ec_lib.c
index b37efac246a..3313573a05c 100644
--- a/lib/libcrypto/ec/ec_lib.c
+++ b/lib/libcrypto/ec/ec_lib.c
@@ -130,8 +130,7 @@ EC_GROUP_free(EC_GROUP * group)
BN_free(&group->order);
BN_free(&group->cofactor);
- if (group->seed)
- free(group->seed);
+ free(group->seed);
free(group);
}
@@ -218,8 +217,7 @@ EC_GROUP_copy(EC_GROUP * dest, const EC_GROUP * src)
dest->asn1_form = src->asn1_form;
if (src->seed) {
- if (dest->seed)
- free(dest->seed);
+ free(dest->seed);
dest->seed = malloc(src->seed_len);
if (dest->seed == NULL)
return 0;
@@ -227,8 +225,7 @@ EC_GROUP_copy(EC_GROUP * dest, const EC_GROUP * src)
return 0;
dest->seed_len = src->seed_len;
} else {
- if (dest->seed)
- free(dest->seed);
+ free(dest->seed);
dest->seed = NULL;
dest->seed_len = 0;
}