Fix indentation and add goto cleanup; stmt
diff --git a/library/md.c b/library/md.c index 625b34c..cec4243 100644 --- a/library/md.c +++ b/library/md.c
@@ -436,7 +436,8 @@ goto cleanup; if( ( ret = mbedtls_md_hmac_update( &ctx, input, ilen ) ) != 0 ) goto cleanup; - ret = mbedtls_md_hmac_finish( &ctx, output ); + if( ( ret = mbedtls_md_hmac_finish( &ctx, output ) ) != 0 ) + goto cleanup; cleanup: mbedtls_md_free( &ctx );