From 230e7940da23b3fa3f08ea682cbd1c20b4e32196 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Fri, 5 Jun 2020 18:45:48 +0100
Subject: [PATCH] wrap: Really fail on invalid --env-if-host argument

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 src/wrap.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/wrap.c b/src/wrap.c
index 083c527ae..b627f3165 100644
--- a/src/wrap.c
+++ b/src/wrap.c
@@ -856,9 +856,12 @@ main (int argc,
           const char *equals = strchr (opt_env_if_host[i], '=');
 
           if (equals == NULL)
-            g_printerr ("%s: --env-if-host argument must be of the form "
-                        "NAME=VALUE, not \"%s\"\n",
-                        g_get_prgname (), opt_env_if_host[i]);
+            {
+              g_printerr ("%s: --env-if-host argument must be of the form "
+                          "NAME=VALUE, not \"%s\"\n",
+                          g_get_prgname (), opt_env_if_host[i]);
+              goto out;
+            }
         }
     }
 
-- 
GitLab