]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
backends/cryptodev-vhost-user: Fix local_error leaks
authorGabriel Barrantes <gabriel.barrantes.dev@outlook.com>
Sat, 28 Dec 2024 01:16:57 +0000 (01:16 +0000)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 17 Jan 2025 06:16:39 +0000 (09:16 +0300)
Do not propagate error to the upper, directly output the error
to avoid leaks.

Fixes: 2fda101de07 ("virtio-crypto: Support asynchronous mode")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2714
Signed-off-by: Gabriel Barrantes <gabriel.barrantes.dev@outlook.com>
Reviewed-by: zhenwei pi <pizhenwei@bytedance.com>
Message-Id: <DM8PR13MB50781054A4FDACE6F4FB6469B30F2@DM8PR13MB5078.namprd13.prod.outlook.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit 78b0c15a563ac4be5afb0375602ca0a3adc6c442)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
backends/cryptodev-vhost-user.c

index c3283ba84a55e53e3f57d22093c011c588d1d85b..b8e95ca8b42c53f5353ffa0b237dc8fbf57011aa 100644 (file)
@@ -281,8 +281,7 @@ 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;
     }