[20/25] test_icount: fclose() before exit

Submitted by Eric Sandeen on Sept. 16, 2011, 8:49 p.m.

Details

Message ID 1316206180-6375-21-git-send-email-sandeen@redhat.com
State Accepted, archived
Headers show

Commit Message

Eric Sandeen Sept. 16, 2011, 8:49 p.m.
Just to be tidy.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
 tests/progs/test_icount.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Theodore Ts'o Sept. 16, 2011, 10:58 p.m.
On Fri, Sep 16, 2011 at 03:49:35PM -0500, Eric Sandeen wrote:
> Just to be tidy.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Applied, thanks.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch hide | download patch | download mbox

diff --git a/tests/progs/test_icount.c b/tests/progs/test_icount.c
index 777a812..017cc4d 100644
--- a/tests/progs/test_icount.c
+++ b/tests/progs/test_icount.c
@@ -289,6 +289,8 @@  static int source_file(const char *cmd_file, int sci_idx)
 			exit_status++;
 		}
 	}
+	if (f != stdin)
+		fclose(f);
 	return exit_status;
 }