diff --git a/library/pk.c b/library/pk.c index ca99fc6335..edbbf50371 100644 --- a/library/pk.c +++ b/library/pk.c @@ -66,6 +66,8 @@ void pk_free( pk_context *ctx ) break; } + free( ctx-> data ); + ctx->type = POLARSSL_PK_NONE; ctx->data = NULL; }