commit | 42e5e1084eeecf4b80cfba3557388b4d0942772c | [log] [tgz] |
---|---|---|
author | Andres Amaya Garcia <andres.amayagarcia@arm.com> | Thu Jul 20 16:27:03 2017 +0100 |
committer | Andres Amaya Garcia <andres.amayagarcia@arm.com> | Thu Jul 20 16:27:03 2017 +0100 |
tree | d05f8763bcf5197f05e0b0b7852346598b9b2a59 | |
parent | 46f5a3e9b4d5db3cacfe2ba33480a27317c62d46 [diff] |
Add goto cleanup; for consistency md.c
diff --git a/library/md.c b/library/md.c index a84f304..625b34c 100644 --- a/library/md.c +++ b/library/md.c
@@ -358,8 +358,9 @@ if( ( ret = ctx->md_info->starts_func( ctx->md_ctx ) ) != 0 ) goto cleanup; - ret = ctx->md_info->update_func( ctx->md_ctx, ipad, - ctx->md_info->block_size ); + if( ( ret = ctx->md_info->update_func( ctx->md_ctx, ipad, + ctx->md_info->block_size ) ) != 0 ) + goto cleanup; cleanup: mbedtls_zeroize( sum, sizeof( sum ) );