From 033b58a77339dfc04b365da42979da680f254e76 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Mon, 27 Aug 2018 16:11:02 -0400 Subject: [PATCH] Fix: missing error handling goto statement in runas MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Found by Coverity: CID 1395218: Code maintainability issues (UNUSED_VALUE) Assigning value "-1" to "ret" here, but that stored value is overwritten before it can be used. Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- src/common/runas.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/runas.c b/src/common/runas.c index 3916d6754..4a8536c6d 100644 --- a/src/common/runas.c +++ b/src/common/runas.c @@ -710,6 +710,7 @@ int run_as_cmd(struct run_as_worker *worker, PERROR("Error reading response from run_as"); ret = -1; ret_value->_errno = errno; + goto end; } /* -- 2.34.1