From 07edd3b9e5855332a02ef7b91602c93aa12c1fd1 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 29 Feb 2016 17:40:08 +0100 Subject: [PATCH] test-clock: fix FILE* leak Close the FILE* instead of the underlying fd. --- src/test/test-clock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/test-clock.c b/src/test/test-clock.c index 0949793..84f775e 100644 --- a/src/test/test-clock.c +++ b/src/test/test-clock.c @@ -28,8 +28,8 @@ static void test_clock_is_localtime(void) { char adjtime[] = "/tmp/test-adjtime.XXXXXX"; - _cleanup_close_ int fd = -1; - FILE* f; + int fd = -1; + _cleanup_fclose_ FILE* f = NULL; static const struct scenario { const char* contents; -- 2.7.4