From eae00a5c77e0707084381adf2274996e0c0ad2fe Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Sun, 3 Mar 2013 18:56:46 +0100 Subject: [PATCH] core/subscription: fix wrong check in uwsgi_subscribe2 It looks like both s2_server and s2_key are mandatory in uwsgi_send_subscription so fail if any of them is missing not both. Reported by coverity as CID #989245. --- core/subscription.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/subscription.c b/core/subscription.c index ad7f1788..3cf9926c 100644 --- a/core/subscription.c +++ b/core/subscription.c @@ -767,7 +767,7 @@ void uwsgi_subscribe2(char *arg, uint8_t cmd) { return; } - if (!s2_server && !s2_key) goto end; + if (!s2_server || !s2_key) goto end; if (s2_check) { if (uwsgi_file_exists(s2_check)) goto end;