From: Martin Pitt Date: Mon, 29 Feb 2016 16:40:08 +0000 (+0100) Subject: test-clock: fix FILE* leak X-Git-Tag: v230~300^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2769%2Fhead;p=thirdparty%2Fsystemd.git test-clock: fix FILE* leak Close the FILE* instead of the underlying fd. --- diff --git a/src/test/test-clock.c b/src/test/test-clock.c index 0949793e5f7..84f775e5bc2 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;