[PATCH 1/4] plugins: Fixes a issue when dlsym failed, the handle not closed.

Yonggang Luo posted 4 patches 5 years ago
There is a newer version of this series
[PATCH 1/4] plugins: Fixes a issue when dlsym failed, the handle not closed.
Posted by Yonggang Luo 5 years ago
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 plugins/loader.c | 1 +
 1 file changed, 1 insertion(+)

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;
-- 
2.28.0.windows.1


Re: [PATCH 1/4] plugins: Fixes a issue when dlsym failed, the handle not closed.
Posted by Philippe Mathieu-Daudé 5 years ago
On 9/26/20 4:04 PM, Yonggang Luo wrote:
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>

Superfluous trailing '.' in patch subject.

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

> ---
>  plugins/loader.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> 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;
>