浏览代码

Close the openned task dirs to prevent a leak

Marc Di Luzio 5 年之前
父节点
当前提交
f401b49b1a
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 2 0
      daemon/gamemode-ioprio.c
  2. 2 0
      daemon/gamemode-sched.c

+ 2 - 0
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);
 }
 }

+ 2 - 0
daemon/gamemode-sched.c

@@ -148,6 +148,8 @@ void game_mode_apply_renice(const GameModeContext *self, const pid_t client, int
 			           strerror(errno));
 			           strerror(errno));
 		}
 		}
 	}
 	}
+
+	closedir(client_task_dir);
 }
 }
 
 
 void game_mode_apply_scheduling(const GameModeContext *self, const pid_t client)
 void game_mode_apply_scheduling(const GameModeContext *self, const pid_t client)