dhcp/0010-Handle-null-timeout.patch
Petr Šabata 5da03fab07 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/dhcp#8c5f5bc2cd759f3ad6cfbbfcbd13e93adb16bab3
2020-10-14 23:37:14 +02:00

33 lines
840 B
Diff

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