made test failure memory safe
This commit is contained in:
parent
74931327c0
commit
e4a2986c12
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user