aboutsummaryrefslogtreecommitdiffstats
path: root/main/freeradius/fix-request_running-segfault.patch
blob: d1ca8903027d198b348346a07af09101b2646efe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From 30ffd2174ec0acd1c5b4b4988d522c24d80a1049 Mon Sep 17 00:00:00 2001
From: "Alan T. DeKok" <aland@freeradius.org>
Date: Wed, 20 Nov 2019 08:30:42 -0500
Subject: [PATCH] home_server may be NULL if proxying fails

---
 src/main/process.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/process.c b/src/main/process.c
index 78c6d8a9e5..c8b3af24e2 100644
--- a/src/main/process.c
+++ b/src/main/process.c
@@ -1642,7 +1642,8 @@ static void request_running(REQUEST *request, int action)
 			 *	handler.
 			 */
 			if (request_proxy(request) < 0) {
-				if (request->home_server && request->home_server->server) goto req_finished;
+				if (!request->home_server ||
+				    (request->home_server && request->home_server->server)) goto req_finished;
 
 				(void) setup_post_proxy_fail(request);
 				process_proxy_reply(request, NULL);