diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/ec/ec_lib.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index e0d78d67fb..0cf485de60 100644 --- a/src/lib/libcrypto/ec/ec_lib.c +++ b/src/lib/libcrypto/ec/ec_lib.c | |||
@@ -106,6 +106,8 @@ EC_GROUP *EC_GROUP_new(const EC_METHOD *meth) | |||
106 | 106 | ||
107 | void EC_GROUP_free(EC_GROUP *group) | 107 | void EC_GROUP_free(EC_GROUP *group) |
108 | { | 108 | { |
109 | if (!group) return; | ||
110 | |||
109 | if (group->meth->group_finish != 0) | 111 | if (group->meth->group_finish != 0) |
110 | group->meth->group_finish(group); | 112 | group->meth->group_finish(group); |
111 | 113 | ||
@@ -117,6 +119,8 @@ void EC_GROUP_free(EC_GROUP *group) | |||
117 | 119 | ||
118 | void EC_GROUP_clear_free(EC_GROUP *group) | 120 | void EC_GROUP_clear_free(EC_GROUP *group) |
119 | { | 121 | { |
122 | if (!group) return; | ||
123 | |||
120 | if (group->meth->group_clear_finish != 0) | 124 | if (group->meth->group_clear_finish != 0) |
121 | group->meth->group_clear_finish(group); | 125 | group->meth->group_clear_finish(group); |
122 | else if (group->meth != NULL && group->meth->group_finish != 0) | 126 | else if (group->meth != NULL && group->meth->group_finish != 0) |
@@ -337,6 +341,8 @@ EC_POINT *EC_POINT_new(const EC_GROUP *group) | |||
337 | 341 | ||
338 | void EC_POINT_free(EC_POINT *point) | 342 | void EC_POINT_free(EC_POINT *point) |
339 | { | 343 | { |
344 | if (!point) return; | ||
345 | |||
340 | if (point->meth->point_finish != 0) | 346 | if (point->meth->point_finish != 0) |
341 | point->meth->point_finish(point); | 347 | point->meth->point_finish(point); |
342 | OPENSSL_free(point); | 348 | OPENSSL_free(point); |
@@ -345,6 +351,8 @@ void EC_POINT_free(EC_POINT *point) | |||
345 | 351 | ||
346 | void EC_POINT_clear_free(EC_POINT *point) | 352 | void EC_POINT_clear_free(EC_POINT *point) |
347 | { | 353 | { |
354 | if (!point) return; | ||
355 | |||
348 | if (point->meth->point_clear_finish != 0) | 356 | if (point->meth->point_clear_finish != 0) |
349 | point->meth->point_clear_finish(point); | 357 | point->meth->point_clear_finish(point); |
350 | else if (point->meth != NULL && point->meth->point_finish != 0) | 358 | else if (point->meth != NULL && point->meth->point_finish != 0) |