Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: relayd: fix NULL check
To:
Jan Schreiber <jes@posteo.de>
Cc:
tech@openbsd.org
Date:
Wed, 1 Apr 2026 16:32:28 +0200

Download raw body.

Thread
On Wed, Apr 01, 2026 at 02:22:39PM +0000, Jan Schreiber wrote:
> Hello,
> 
> match->kv_key is checked twice for being NULL.
> The second one should most likely be match->kv_value.

ok tb

> 
> 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;
>