made test failure memory safe

This commit is contained in:
Václav Šmejkal 2022-05-24 18:09:35 +02:00
parent 74931327c0
commit e4a2986c12

View File

@ -7,6 +7,7 @@
int main(void) int main(void)
{ {
char *buffer = malloc(64); char *buffer = malloc(64);
int exitCode = 0;
inputFlags flags = inputFlags flags =
{ {
@ -27,12 +28,12 @@ int main(void)
else else
{ {
fprintf(stderr, "Test failed!\n"); fprintf(stderr, "Test failed!\n");
exit(1); exitCode = 1;
} }
//DEALLOCATION //DEALLOCATION
free(buffer); free(buffer);
deallocateOutput(encrypted); deallocateOutput(encrypted);
return 0; return exitCode;
} }