diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ec_lib.c')
| -rw-r--r-- | src/lib/libcrypto/ec/ec_lib.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index baddbf6dc8..0d062111b5 100644 --- a/src/lib/libcrypto/ec/ec_lib.c +++ b/src/lib/libcrypto/ec/ec_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_lib.c,v 1.23 2017/01/29 17:49:23 beck Exp $ */ | 1 | /* $OpenBSD: ec_lib.c,v 1.24 2017/05/02 03:59:44 deraadt Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Originally written by Bodo Moeller for the OpenSSL project. | 3 | * Originally written by Bodo Moeller for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -151,12 +151,8 @@ EC_GROUP_clear_free(EC_GROUP * group) | |||
| 151 | BN_clear_free(&group->order); | 151 | BN_clear_free(&group->order); |
| 152 | BN_clear_free(&group->cofactor); | 152 | BN_clear_free(&group->cofactor); |
| 153 | 153 | ||
| 154 | if (group->seed) { | 154 | freezero(group->seed, group->seed_len); |
| 155 | explicit_bzero(group->seed, group->seed_len); | 155 | freezero(group, sizeof *group); |
| 156 | free(group->seed); | ||
| 157 | } | ||
| 158 | explicit_bzero(group, sizeof *group); | ||
| 159 | free(group); | ||
| 160 | } | 156 | } |
| 161 | 157 | ||
| 162 | 158 | ||
| @@ -743,8 +739,7 @@ EC_POINT_clear_free(EC_POINT * point) | |||
| 743 | point->meth->point_clear_finish(point); | 739 | point->meth->point_clear_finish(point); |
| 744 | else if (point->meth->point_finish != 0) | 740 | else if (point->meth->point_finish != 0) |
| 745 | point->meth->point_finish(point); | 741 | point->meth->point_finish(point); |
| 746 | explicit_bzero(point, sizeof *point); | 742 | freezero(point, sizeof *point); |
| 747 | free(point); | ||
| 748 | } | 743 | } |
| 749 | 744 | ||
| 750 | 745 | ||
