diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2016-02-29 17:40:08 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2016-02-29 17:40:08 +0100 |
commit | 07edd3b9e5855332a02ef7b91602c93aa12c1fd1 (patch) | |
tree | e989deef8256be7d039a78c74d5b47b5b0d9f3ac /src/test/test-clock.c | |
parent | d69d951b11e80dbcc7f62938951832638119bdd9 (diff) |
test-clock: fix FILE* leak
Close the FILE* instead of the underlying fd.
Diffstat (limited to 'src/test/test-clock.c')
-rw-r--r-- | src/test/test-clock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test-clock.c b/src/test/test-clock.c index 0949793e5f..84f775e5bc 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; |