mirror of
https://github.com/openbsd/src.git
synced 2026-04-19 19:54:14 +00:00
relayd: fix NULL check for strdup()
Due to a copy-paste error, relay_lookup_query() would check the wrong kv member for NULL. From Jan Schreiber
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: relay_http.c,v 1.94 2026/03/08 11:06:30 rsadowski Exp $ */
|
||||
/* $OpenBSD: relay_http.c,v 1.95 2026/04/02 13:28:22 tb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 - 2016 Reyk Floeter <reyk@openbsd.org>
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user