From: Francis Deslauriers Date: Mon, 27 Aug 2018 20:11:02 +0000 (-0400) Subject: Fix: missing error handling goto statement in runas X-Git-Tag: v2.11.0-rc1~49 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=033b58a77339dfc04b365da42979da680f254e76;p=lttng-tools.git Fix: missing error handling goto statement in runas 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 --- 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; } /*