qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] backends/cryptodev-vhost-user: Fix local_error leaks


From: zhenwei pi
Subject: Re: [PATCH] backends/cryptodev-vhost-user: Fix local_error leaks
Date: Wed, 25 Dec 2024 14:33:36 +0800
User-agent: Mozilla Thunderbird

LGTM, thanks.

Reviewed-by: zhenwei pi <pizhenwei@bytedance.com>

On 12/24/24 07:46, Gabriel Barrantes wrote:
 From c808fa797942b9bd32221594b7eef690a7558b14 Mon Sep 17 00:00:00 2001
From: Gabriel Barrantes <gabriel.barrantes.dev@outlook.com>
Date: Mon, 23 Dec 2024 14:58:12 -0600
Subject: [PATCH] backends/cryptodev-vhost-user: Fix local_error leaks

Do not propagate error to the upper, directly output the error to
avoid leaks.

Closes: #2714

Signed-off-by: Gabriel Barrantes <gabriel.barrantes.dev@outlook.com>
---
backends/cryptodev-vhost-user.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/backends/cryptodev-vhost-user.c b/backends/cryptodev-vhost- user.c
index 43efdf9747..09bfbddb47 100644
--- a/backends/cryptodev-vhost-user.c
+++ b/backends/cryptodev-vhost-user.c
@@ -281,8 +281,8 @@ static int cryptodev_vhost_user_create_session(
         break;

     default:
-        error_setg(&local_error, "Unsupported opcode :%" PRIu32 "",
-                   sess_info->op_code);
+        error_report("Unsupported opcode :%" PRIu32 "",
+                     sess_info->op_code);
         return -VIRTIO_CRYPTO_NOTSUPP;
     }

--
2.43.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]