Browse Source

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>
tags/json-c-0.13-20171207
Alexandru Ardelean 8 years ago
parent
commit
7b9432d564
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      tests/test_util_file.c

+ 1
- 0
tests/test_util_file.c View File

@@ -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)


Loading…
Cancel
Save