All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 2/2] lsefi: fixed memory leaks
@ 2022-02-14 13:25 Renaud Métrich
  2022-02-15 13:07 ` Renaud Métrich
  0 siblings, 1 reply; 4+ messages in thread
From: Renaud Métrich @ 2022-02-14 13:25 UTC (permalink / raw)
  To: grub-devel; +Cc: Renaud Métrich

Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
---
 grub-core/commands/efi/lsefi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/grub-core/commands/efi/lsefi.c b/grub-core/commands/efi/lsefi.c
index 7acba3b39..f0b9201f1 100644
--- a/grub-core/commands/efi/lsefi.c
+++ b/grub-core/commands/efi/lsefi.c
@@ -186,8 +186,12 @@ grub_cmd_lsefi (grub_command_t cmd __attribute__ ((unused)),
 			 (unsigned) protocols[j]->data4[7]);
 	}
 
+      if (protocols)
+	grub_efi_free_pool (protocols);
     }
 
+  grub_free (handles);
+
   return 0;
 }
 
-- 
2.34.1



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

* Re: [PATCH v2 2/2] lsefi: fixed memory leaks
  2022-02-14 13:25 [PATCH v2 2/2] lsefi: fixed memory leaks Renaud Métrich
@ 2022-02-15 13:07 ` Renaud Métrich
  2022-02-15 18:09   ` Glenn Washburn
  0 siblings, 1 reply; 4+ messages in thread
From: Renaud Métrich @ 2022-02-15 13:07 UTC (permalink / raw)
  To: grub-devel


[-- Attachment #1.1: Type: text/plain, Size: 773 bytes --]

Please ignore, deprecated by "efi: new 'connectefi' command" (v3).

Sorry for the mess.

Le 2/14/22 à 14:25, Renaud Métrich a écrit :
> Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
> ---
>   grub-core/commands/efi/lsefi.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/grub-core/commands/efi/lsefi.c b/grub-core/commands/efi/lsefi.c
> index 7acba3b39..f0b9201f1 100644
> --- a/grub-core/commands/efi/lsefi.c
> +++ b/grub-core/commands/efi/lsefi.c
> @@ -186,8 +186,12 @@ grub_cmd_lsefi (grub_command_t cmd __attribute__ ((unused)),
>   			 (unsigned) protocols[j]->data4[7]);
>   	}
>   
> +      if (protocols)
> +	grub_efi_free_pool (protocols);
>       }
>   
> +  grub_free (handles);
> +
>     return 0;
>   }
>   

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

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

* Re: [PATCH v2 2/2] lsefi: fixed memory leaks
  2022-02-15 13:07 ` Renaud Métrich
@ 2022-02-15 18:09   ` Glenn Washburn
  0 siblings, 0 replies; 4+ messages in thread
From: Glenn Washburn @ 2022-02-15 18:09 UTC (permalink / raw)
  To: Renaud Métrich; +Cc: The development of GNU GRUB

On Tue, 15 Feb 2022 14:07:15 +0100
Renaud Métrich <rmetrich@redhat.com> wrote:

> Please ignore, deprecated by "efi: new 'connectefi' command" (v3).

I'm not sure what was eactly wrong with v3 (haven't looked at the
difference). However, v3 was done better in some regards. On this list
it is customary to have multi-patch series both threaded and with a
cover letter, as was done in v3.

v2 is confusing because there are apparently 3 patches, 2 of which are
duplicates (or so it seems from the subject). Of the 3 patches two are
threaded, but one is on its own thread.

For a patch series such as this, it is recommended to use git
format-patches --thread and --cover-letter options and have a brief
explanation of the series in the cover letter.  I also like to use
either --range-diff or --interdiff (as appropriate) when not the first
version of the patch series.

So if there is some problem with the actual changes in v3, I recommend
creating a v4 incorporating the above suggestions.

Glenn

> 
> Sorry for the mess.
> 
> Le 2/14/22 à 14:25, Renaud Métrich a écrit :
> > Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
> > ---
> >   grub-core/commands/efi/lsefi.c | 4 ++++
> >   1 file changed, 4 insertions(+)
> >
> > diff --git a/grub-core/commands/efi/lsefi.c b/grub-core/commands/efi/lsefi.c
> > index 7acba3b39..f0b9201f1 100644
> > --- a/grub-core/commands/efi/lsefi.c
> > +++ b/grub-core/commands/efi/lsefi.c
> > @@ -186,8 +186,12 @@ grub_cmd_lsefi (grub_command_t cmd __attribute__ ((unused)),
> >   			 (unsigned) protocols[j]->data4[7]);
> >   	}
> >   
> > +      if (protocols)
> > +	grub_efi_free_pool (protocols);
> >       }
> >   
> > +  grub_free (handles);
> > +
> >     return 0;
> >   }
> >   


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

* [PATCH v2 2/2] lsefi: fixed memory leaks
  2022-02-14 13:23 [PATCH v2 1/2] efi: new 'connectefi' command Renaud Métrich
@ 2022-02-14 13:23 ` Renaud Métrich
  0 siblings, 0 replies; 4+ messages in thread
From: Renaud Métrich @ 2022-02-14 13:23 UTC (permalink / raw)
  To: grub-devel; +Cc: Fedora Ninjas, Renaud Métrich

From: Fedora Ninjas <grub2-owner@fedoraproject.org>

Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
---
 grub-core/commands/efi/lsefi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/grub-core/commands/efi/lsefi.c b/grub-core/commands/efi/lsefi.c
index 7acba3b39..f0b9201f1 100644
--- a/grub-core/commands/efi/lsefi.c
+++ b/grub-core/commands/efi/lsefi.c
@@ -186,8 +186,12 @@ grub_cmd_lsefi (grub_command_t cmd __attribute__ ((unused)),
 			 (unsigned) protocols[j]->data4[7]);
 	}
 
+      if (protocols)
+	grub_efi_free_pool (protocols);
     }
 
+  grub_free (handles);
+
   return 0;
 }
 
-- 
2.34.1



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

end of thread, other threads:[~2022-02-15 18:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 13:25 [PATCH v2 2/2] lsefi: fixed memory leaks Renaud Métrich
2022-02-15 13:07 ` Renaud Métrich
2022-02-15 18:09   ` Glenn Washburn
  -- strict thread matches above, loose matches on Subject: below --
2022-02-14 13:23 [PATCH v2 1/2] efi: new 'connectefi' command Renaud Métrich
2022-02-14 13:23 ` [PATCH v2 2/2] lsefi: fixed memory leaks Renaud Métrich

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.