qemu-devel
[Top][All Lists]
Advanced

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

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


From: Gabriel Barrantes
Subject: [PATCH] backends/cryptodev-vhost-user: Fix local_error leaks
Date: Mon, 23 Dec 2024 23:46:57 +0000

>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]