From 42e9a0146ebfd6213da93826362639208cd73762 Mon Sep 17 00:00:00 2001 From: Cheng-Yang Chou Date: Sun, 13 Apr 2025 03:02:52 +0800 Subject: [PATCH] Avoid double free fast_buf.buf is already freed in the common error path. Removing the redundant vfree prevents potential double-free. Co-authored-by: Po-Ying Chiu --- simrupt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/simrupt.c b/simrupt.c index d24d189..0095728 100644 --- a/simrupt.c +++ b/simrupt.c @@ -382,7 +382,6 @@ static int __init simrupt_init(void) /* Create the workqueue */ simrupt_workqueue = alloc_workqueue("simruptd", WQ_UNBOUND, WQ_MAX_ACTIVE); if (!simrupt_workqueue) { - vfree(fast_buf.buf); ret = -ENOMEM; goto error_workqueue; }