diff options
Diffstat (limited to 'tests/test-freadahead.c')
-rw-r--r-- | tests/test-freadahead.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test-freadahead.c b/tests/test-freadahead.c index 287a9369b8..a3c75d039c 100644 --- a/tests/test-freadahead.c +++ b/tests/test-freadahead.c @@ -33,6 +33,7 @@ main (int argc, char **argv) { void *buf = malloc (nbytes); ASSERT (fread (buf, 1, nbytes, stdin) == nbytes); + free (buf); } if (nbytes == 0) @@ -69,5 +70,8 @@ main (int argc, char **argv) } } + /* Free memory allocated during ungetc(). */ + fclose (stdin); + return 0; } |