aboutsummaryrefslogtreecommitdiff
path: root/lib/tran_pipe.c
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2022-04-21 17:12:14 +0100
committerGitHub <noreply@github.com>2022-04-21 17:12:14 +0100
commit4ba8cde7c5417cfb11e1fc5d1d188f6a4f9a35d5 (patch)
tree27346ecea46e1f7572aa1bc199743a3338100041 /lib/tran_pipe.c
parent3779fca8c766b18b6d68feda9ed7958aa60bd4cf (diff)
downloadlibvfio-user-4ba8cde7c5417cfb11e1fc5d1d188f6a4f9a35d5.zip
libvfio-user-4ba8cde7c5417cfb11e1fc5d1d188f6a4f9a35d5.tar.gz
libvfio-user-4ba8cde7c5417cfb11e1fc5d1d188f6a4f9a35d5.tar.bz2
fix a small coverity complaint (#663)
The complaint was: 259 if (ret != 0) { >>> CID 392380: Possible Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "free(tp);". 260 free(tp); 261 return ERROR_INT(ret); 262 } Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'lib/tran_pipe.c')
-rw-r--r--lib/tran_pipe.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/tran_pipe.c b/lib/tran_pipe.c
index 5b47142..34dd075 100644
--- a/lib/tran_pipe.c
+++ b/lib/tran_pipe.c
@@ -243,7 +243,6 @@ static int
tran_pipe_init(vfu_ctx_t *vfu_ctx)
{
tran_pipe_t *tp = NULL;
- int ret = 0;
assert(vfu_ctx != NULL);
@@ -256,11 +255,6 @@ tran_pipe_init(vfu_ctx_t *vfu_ctx)
tp->in_fd = -1;
tp->out_fd = -1;
- if (ret != 0) {
- free(tp);
- return ERROR_INT(ret);
- }
-
vfu_ctx->tran_data = tp;
return 0;
}