tests: fix leak in test_util_file ; found by cppcheck
Which now seems to fail the build. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
@@ -106,6 +106,7 @@ static void stat_and_cat(const char *file)
|
|||||||
buf[sb.st_size] = '\0';
|
buf[sb.st_size] = '\0';
|
||||||
printf("file[%s], size=%d, contents=%s\n", file, (int)sb.st_size, buf);
|
printf("file[%s], size=%d, contents=%s\n", file, (int)sb.st_size, buf);
|
||||||
free(buf);
|
free(buf);
|
||||||
|
close(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
|
|||||||
Reference in New Issue
Block a user