Fix: missing error handling goto statement in runas
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Mon, 27 Aug 2018 20:11:02 +0000 (16:11 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 29 Aug 2018 20:36:06 +0000 (16:36 -0400)
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 <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/runas.c

index 3916d6754314eadd4947b576dbcb4d98273ad861..4a8536c6de0eb1063ed9b4f351d1f40c37355c50 100644 (file)
@@ -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;
        }
 
        /*
This page took 0.026509 seconds and 4 git commands to generate.