libtests/calloc.c: Fix reported memory leak

This fix came from Code Inspector, flagged by one of the analysis that
was done.

This test code is compiled only but better to address the issues so
future static analysis reports will not include it.
This commit is contained in:
zack leung
2021-10-18 23:46:10 +00:00
committed by Joel Sherrill
parent a857a225d0
commit 19c101281a

View File

@@ -16,6 +16,8 @@ int
main (void)
{
void *foo = calloc (42, 43);
int rc = (foo != NULL);
free(foo);
return (foo != NULL);
return rc;
}