All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] util/grub-mkfont: Fix resource leaks
@ 2022-08-01  8:31 Qiumiao Zhang
  2022-08-02 10:44 ` Daniel Kiper
  0 siblings, 1 reply; 3+ messages in thread
From: Qiumiao Zhang @ 2022-08-01  8:31 UTC (permalink / raw)
  To: grub-devel; +Cc: fengtao40, zhangqiumiao1, rose.chen, zhaowei23

---
 util/grub-mkfont.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c
index f07566ade..0070edf19 100644
--- a/util/grub-mkfont.c
+++ b/util/grub-mkfont.c
@@ -699,6 +699,7 @@ add_font (struct grub_font_info *font_info, FT_Face face, int nocut)
 	      }
 	    }
 	}
+      free(gsub);
     }
 
   if (font_info->num_range)
@@ -1322,11 +1323,15 @@ main (int argc, char *argv[])
   if (font_verbosity > 1)
     print_glyphs (&arguments.font_info);
 
+  free(arguments.font_info.glyphs_sorted);
+
   {
     size_t i;
     for (i = 0; i < arguments.nfiles; i++)
       free (arguments.files[i]);
   }
 
+  free(arguments.files);
+
   return 0;
 }
-- 
2.28.0.windows.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] util/grub-mkfont: Fix resource leaks
  2022-08-01  8:31 [PATCH] util/grub-mkfont: Fix resource leaks Qiumiao Zhang
@ 2022-08-02 10:44 ` Daniel Kiper
  2022-08-02 11:31   ` 答复: " zhangqiumiao
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Kiper @ 2022-08-02 10:44 UTC (permalink / raw)
  To: Qiumiao Zhang; +Cc: fengtao40, rose.chen, zhaowei23, grub-devel

Missing Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>

If you are OK I can add it on your behalf this time.

On Mon, Aug 01, 2022 at 04:31:02PM +0800, Qiumiao Zhang via Grub-devel wrote:
> ---
>  util/grub-mkfont.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c
> index f07566ade..0070edf19 100644
> --- a/util/grub-mkfont.c
> +++ b/util/grub-mkfont.c
> @@ -699,6 +699,7 @@ add_font (struct grub_font_info *font_info, FT_Face face, int nocut)
>  	      }
>  	    }
>  	}
> +      free(gsub);
>      }
>
>    if (font_info->num_range)
> @@ -1322,11 +1323,15 @@ main (int argc, char *argv[])
>    if (font_verbosity > 1)
>      print_glyphs (&arguments.font_info);
>
> +  free(arguments.font_info.glyphs_sorted);
> +
>    {
>      size_t i;
>      for (i = 0; i < arguments.nfiles; i++)
>        free (arguments.files[i]);
>    }
>
> +  free(arguments.files);
> +
>    return 0;
>  }

Otherwise Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

Thank you for fixing these issues.

Daniel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* 答复: [PATCH] util/grub-mkfont: Fix resource leaks
  2022-08-02 10:44 ` Daniel Kiper
@ 2022-08-02 11:31   ` zhangqiumiao
  0 siblings, 0 replies; 3+ messages in thread
From: zhangqiumiao @ 2022-08-02 11:31 UTC (permalink / raw)
  To: Daniel Kiper
  Cc: Fengtao (fengtao, Euler), Chenxiang(Euler), Zhaowei (EulerOS),
	grub-devel

OK, that's perfect.

-----邮件原件-----
发件人: Daniel Kiper [mailto:dkiper@net-space.pl] 
发送时间: 2022年8月2日 18:44
收件人: zhangqiumiao <zhangqiumiao1@huawei.com>
抄送: Fengtao (fengtao, Euler) <fengtao40@huawei.com>; Chenxiang(Euler) <rose.chen@huawei.com>; Zhaowei (EulerOS) <zhaowei23@huawei.com>; grub-devel@gnu.org
主题: Re: [PATCH] util/grub-mkfont: Fix resource leaks

Missing Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>

If you are OK I can add it on your behalf this time.

On Mon, Aug 01, 2022 at 04:31:02PM +0800, Qiumiao Zhang via Grub-devel wrote:
> ---
>  util/grub-mkfont.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c index 
> f07566ade..0070edf19 100644
> --- a/util/grub-mkfont.c
> +++ b/util/grub-mkfont.c
> @@ -699,6 +699,7 @@ add_font (struct grub_font_info *font_info, FT_Face face, int nocut)
>  	      }
>  	    }
>  	}
> +      free(gsub);
>      }
>
>    if (font_info->num_range)
> @@ -1322,11 +1323,15 @@ main (int argc, char *argv[])
>    if (font_verbosity > 1)
>      print_glyphs (&arguments.font_info);
>
> +  free(arguments.font_info.glyphs_sorted);
> +
>    {
>      size_t i;
>      for (i = 0; i < arguments.nfiles; i++)
>        free (arguments.files[i]);
>    }
>
> +  free(arguments.files);
> +
>    return 0;
>  }

Otherwise Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

Thank you for fixing these issues.

Daniel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-02 11:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-01  8:31 [PATCH] util/grub-mkfont: Fix resource leaks Qiumiao Zhang
2022-08-02 10:44 ` Daniel Kiper
2022-08-02 11:31   ` 答复: " zhangqiumiao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.