[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/1] module: Prevent crash by resetting local_err in module_load_
|
From: |
Alexander Ivanov |
|
Subject: |
[PATCH 1/1] module: Prevent crash by resetting local_err in module_load_qom_all() |
|
Date: |
Fri, 9 Aug 2024 14:13:40 +0200 |
Set local_err to NULL after it has been freed in error_report_err(). This
avoids triggering assert(*errp == NULL) failure in error_setv() when
local_err is reused in the loop.
Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
---
util/module.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/util/module.c b/util/module.c
index 32e263163c..3ff4aee2ca 100644
--- a/util/module.c
+++ b/util/module.c
@@ -369,6 +369,7 @@ void module_load_qom_all(void)
}
if (module_load("", modinfo->name, &local_err) < 0) {
error_report_err(local_err);
+ local_err = NULL;
}
}
module_loaded_qom_all = true;
--
2.43.0