test-clock: fix FILE* leak

Close the FILE* instead of the underlying fd.
This commit is contained in:
Martin Pitt
2016-02-29 17:40:08 +01:00
parent d69d951b11
commit 07edd3b9e5
+2 -2
View File
@@ -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;