[PATCH] manual: Add missing free to open_memstream example [BZ #27866]

Ravina Jain rajulravina123@gmail.com
Tue Jun 24 17:11:59 GMT 2025


Hello Collin,

Thanks for the feedback and suggestion. I will definitely make a note of
this and will implement this practice from my next patch onwards.

Thank you for this opportunity.

On Tue, 24 Jun 2025, 21:37 Collin Funk, <collin.funk1@gmail.com> wrote:

> Hi Ravina,
>
> Ravina Jain <rajulravina123@gmail.com> writes:
>
> > ---
> >  manual/examples/memstrm.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/manual/examples/memstrm.c b/manual/examples/memstrm.c
> > index 9ee6298a35..28be892aeb 100644
> > --- a/manual/examples/memstrm.c
> > +++ b/manual/examples/memstrm.c
> > @@ -16,6 +16,7 @@
> >  */
> >
> >  #include <stdio.h>
> > +#include <stdlib.h>
> >
> >  int
> >  main (void)
> > @@ -31,6 +32,7 @@ main (void)
> >    fprintf (stream, ", world");
> >    fclose (stream);
> >    printf ("buf = `%s', size = %zu\n", bp, size);
> > +  free (bp);
> >
> >    return 0;
> >  }
>
> Looks good, thanks for fixing the formatting.
>
> Reviewed-by: Collin Funk <collin.funk1@gmail.com>
>
> For future reference, when submitting a patch after incorporating
> suggestions from the first one, do:
>
>     $ git format-patch --reroll-count=2 -1
>     $ git send-email ./v2-0001-blah-blah-blah.patch
>
> I like to do --in-reply-to=<v1-message-id> as well, but that is less
> important.
>
> Thanks again,
> Collin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20250624/5ac69112/attachment.htm>


More information about the Libc-alpha mailing list