mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-26 06:08:20 +00:00
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:
committed by
Joel Sherrill
parent
a857a225d0
commit
19c101281a
@@ -16,6 +16,8 @@ int
|
||||
main (void)
|
||||
{
|
||||
void *foo = calloc (42, 43);
|
||||
int rc = (foo != NULL);
|
||||
free(foo);
|
||||
|
||||
return (foo != NULL);
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user