From f401b49b1ac52f531ae066c5fe0b0386ce4be8a2 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Wed, 15 May 2019 18:20:36 +0100 Subject: [PATCH] Close the openned task dirs to prevent a leak --- daemon/gamemode-ioprio.c | 2 ++ daemon/gamemode-sched.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/daemon/gamemode-ioprio.c b/daemon/gamemode-ioprio.c index 620e604..6af6779 100644 --- a/daemon/gamemode-ioprio.c +++ b/daemon/gamemode-ioprio.c @@ -188,4 +188,6 @@ void game_mode_apply_ioprio(const GameModeContext *self, const pid_t client, int } } } + + closedir(client_task_dir); } diff --git a/daemon/gamemode-sched.c b/daemon/gamemode-sched.c index 0414b96..2c82d64 100644 --- a/daemon/gamemode-sched.c +++ b/daemon/gamemode-sched.c @@ -148,6 +148,8 @@ void game_mode_apply_renice(const GameModeContext *self, const pid_t client, int strerror(errno)); } } + + closedir(client_task_dir); } void game_mode_apply_scheduling(const GameModeContext *self, const pid_t client)