diff mbox series

[v3,1/6] plugins: Fixes a issue when dlsym failed, the handle not closed

Message ID 20201001163429.1348-2-luoyonggang@gmail.com
State Superseded
Headers show
Series Enable plugin support on msys2/mingw | expand

Commit Message

罗勇刚(Yonggang Luo) Oct. 1, 2020, 4:34 p.m. UTC
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 plugins/loader.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Alex Bennée Oct. 5, 2020, 9:59 a.m. UTC | #1
Yonggang Luo <luoyonggang@gmail.com> writes:

> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>

> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


Reviewed-by: Alex Bennée <alex.bennee@linaro.org>


-- 
Alex Bennée
diff mbox series

Patch

diff --git a/plugins/loader.c b/plugins/loader.c
index 685d334e1a..8ac5dbc20f 100644
--- a/plugins/loader.c
+++ b/plugins/loader.c
@@ -235,6 +235,7 @@  static int plugin_load(struct qemu_plugin_desc *desc, const qemu_info_t *info)
     return rc;
 
  err_symbol:
+    g_module_close(ctx->handle);
  err_dlopen:
     qemu_vfree(ctx);
     return 1;