Index | Thread | Search

From:
Jan Schreiber <jes@posteo.de>
Subject:
relayd: fix NULL check
To:
tech@openbsd.org
Date:
Wed, 01 Apr 2026 14:22:39 +0000

Download raw body.

Thread
Hello,

match->kv_key is checked twice for being NULL.
The second one should most likely be match->kv_value.

Jan

diff --git usr.sbin/relayd/relay_http.c usr.sbin/relayd/relay_http.c
index 056cd076171..d3a3b86c115 100644
--- usr.sbin/relayd/relay_http.c
+++ usr.sbin/relayd/relay_http.c
@@ -1030,7 +1030,7 @@ relay_lookup_query(struct ctl_relay_event *cre, 
struct kv *kv)
         if (match->kv_key == NULL)
                 goto done;
         match->kv_value = strdup(tmpval);
-       if (match->kv_key == NULL)
+       if (match->kv_value == NULL)
                 goto done;
         ret = 0;