Fix for memory leak in ssl tests

Fix for leaked buffers on error case in build_transforms() in
test_suite_ssl.function

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
Paul Elliott 2021-02-03 13:18:33 +00:00
parent 6a32ad83e3
commit c7b53747f7

View file

@ -1354,7 +1354,8 @@ static int build_transforms( mbedtls_ssl_transform *t_in,
t_in->taglen = 8;
break;
default:
return( 1 );
ret = 1;
goto cleanup;
}
break;
@ -1374,7 +1375,8 @@ static int build_transforms( mbedtls_ssl_transform *t_in,
t_in->taglen = 8;
break;
default:
return( 1 );
ret = 1;
goto cleanup;
}
break;
@ -1395,11 +1397,13 @@ static int build_transforms( mbedtls_ssl_transform *t_in,
t_in->maclen = 10;
break;
default:
return( 1 );
ret = 1;
goto cleanup;
}
break;
default:
return( 1 );
ret = 1;
goto cleanup;
break;
}