From d8f27d86f7286531e7035ff22a4188bdd77d206c Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 27 Feb 2011 00:20:42 +0000 Subject: Close the opened handle --- sched_getscheduler.c | 2 ++ sched_setscheduler.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sched_getscheduler.c b/sched_getscheduler.c index 9bc819e..8769c15 100644 --- a/sched_getscheduler.c +++ b/sched_getscheduler.c @@ -62,6 +62,8 @@ sched_getscheduler (pid_t pid) (0xFF & ERROR_ACCESS_DENIED)) ? EPERM : ESRCH; return -1; } + else + CloseHandle(h); } } diff --git a/sched_setscheduler.c b/sched_setscheduler.c index 4e060c7..8691316 100644 --- a/sched_setscheduler.c +++ b/sched_setscheduler.c @@ -64,6 +64,8 @@ sched_setscheduler (pid_t pid, int policy) (0xFF & ERROR_ACCESS_DENIED)) ? EPERM : ESRCH; return -1; } + else + CloseHandle(h); } } -- cgit v1.2.3