9c49c9e
From ed7610cdb2e8ebdbaee618e477879e7e008d4f29 Mon Sep 17 00:00:00 2001
7c09728
From: Pavel Zhukov <pzhukov@redhat.com>
7c09728
Date: Thu, 21 Feb 2019 10:29:08 +0100
9c49c9e
Subject: [PATCH 10/26] Handle null timeout
7c09728
Cc: pzhukov@redhat.com
7c09728
7c09728
Handle cases in add_timeout() where the function is called with a NULL
7c09728
value for the 'when' parameter
7c09728
7c09728
ISC-Bugs: #19867 (rejected)
7c09728
---
7c09728
 common/dispatch.c | 4 ++++
7c09728
 1 file changed, 4 insertions(+)
7c09728
7c09728
diff --git a/common/dispatch.c b/common/dispatch.c
7c09728
index 0207ad3..d7fe200 100644
7c09728
--- a/common/dispatch.c
7c09728
+++ b/common/dispatch.c
7c09728
@@ -209,6 +209,10 @@ void add_timeout (when, where, what, ref, unref)
7c09728
 	isc_interval_t interval;
7c09728
 	isc_time_t expires;
7c09728
 
7c09728
+	if (when == NULL) {
7c09728
+		return;
7c09728
+	}
7c09728
+
7c09728
 	/* See if this timeout supersedes an existing timeout. */
7c09728
 	t = (struct timeout *)0;
7c09728
 	for (q = timeouts; q; q = q->next) {
7c09728
-- 
7c09728
2.14.5
7c09728