From 9b5cdf8ebd94702995ea023d5614fe6efcc7abca Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Mon, 26 Oct 2015 14:30:26 +0100 Subject: [PATCH] Fix resource leak Run fclose after fopen in unittests. --- tests/unittests/helpers.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unittests/helpers.c b/tests/unittests/helpers.c index 564b2716..9cabb1e4 100644 --- a/tests/unittests/helpers.c +++ b/tests/unittests/helpers.c @@ -63,6 +63,7 @@ void load_preferences(void **state) if (f) { prefs_load(); } + fclose(f); } void close_preferences(void **state)