From: Miroslav Lichvar Date: Tue, 10 Nov 2015 13:29:52 +0000 (+0100) Subject: sched: don't allow SCH_RemoveTimeout() with invalid non-zero ID X-Git-Tag: 2.3-pre1~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8803ab27c628eed3e4205131a8dba77490e9ecbe;p=thirdparty%2Fchrony.git sched: don't allow SCH_RemoveTimeout() with invalid non-zero ID --- diff --git a/sched.c b/sched.c index c21f40de..f9720c07 100644 --- a/sched.c +++ b/sched.c @@ -459,9 +459,12 @@ SCH_RemoveTimeout(SCH_TimeoutID id) /* Release memory back to the operating system */ release_tqe(ptr); - break; + return; } } + + /* Catch calls with invalid non-zero ID */ + assert(0); } /* ================================================== */