diff options
author | John Levon <john.levon@nutanix.com> | 2022-04-21 17:12:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-21 17:12:14 +0100 |
commit | 4ba8cde7c5417cfb11e1fc5d1d188f6a4f9a35d5 (patch) | |
tree | 27346ecea46e1f7572aa1bc199743a3338100041 | |
parent | 3779fca8c766b18b6d68feda9ed7958aa60bd4cf (diff) | |
download | libvfio-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>
-rw-r--r-- | lib/tran_pipe.c | 6 |
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; } |