]> xenbits.xensource.com Git - qemu-xen.git/commit
module: Prevent crash by resetting local_err in module_load_qom_all()
authorAlexander Ivanov <alexander.ivanov@virtuozzo.com>
Fri, 9 Aug 2024 12:13:40 +0000 (14:13 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 13 Aug 2024 14:35:47 +0000 (16:35 +0200)
commit940d802b24e63650e0eacad3714e2ce171cba17c
treeb90fb3f365134c0bd9f3c8e23f0f22ed30fb056c
parent7700d2293c085c0481b71cc0f8c04ca20e7bd7d3
module: Prevent crash by resetting local_err in module_load_qom_all()

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>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Link: https://lore.kernel.org/r/20240809121340.992049-2-alexander.ivanov@virtuozzo.com
[Do the same by moving the declaration instead. - Paolo]
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
util/module.c