From 4ba8cde7c5417cfb11e1fc5d1d188f6a4f9a35d5 Mon Sep 17 00:00:00 2001 From: John Levon Date: Thu, 21 Apr 2022 17:12:14 +0100 Subject: 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 Reviewed-by: Swapnil Ingle --- lib/tran_pipe.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'lib/tran_pipe.c') 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; } -- cgit v1.1