Re: [PATCH] fix memory leak within calloc.c libtests

2021-11-03 Thread Joel Sherrill
Pushed. I tinkered with the commit message a bit.

--joel

On Tue, Nov 2, 2021 at 1:00 PM Joel Sherrill  wrote:
>
> This looks good to me.
>
> --joel
>
> On Mon, Nov 1, 2021 at 8:18 PM zack leung  wrote:
> >
> > bump
> >
> >
> > On Mon, 18 Oct 2021 at 23:46, zack leung  wrote:
> >
> > > fix came from github code inspector, flagged by one of the analysis that
> > > was done
> > > ---
> > >  testsuites/libtests/POSIX/calloc.c | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/testsuites/libtests/POSIX/calloc.c
> > > b/testsuites/libtests/POSIX/calloc.c
> > > index bd04faa800..a7537c8cc4 100644
> > > --- a/testsuites/libtests/POSIX/calloc.c
> > > +++ b/testsuites/libtests/POSIX/calloc.c
> > > @@ -16,6 +16,8 @@ int
> > >  main (void)
> > >  {
> > >void *foo = calloc (42, 43);
> > > +  int rc = (foo != NULL);
> > > +  free(foo);
> > >
> > > -  return (foo != NULL);
> > > +  return rc;
> > >  }
> > > --
> > > 2.33.0
> > >
> > ___
> > devel mailing list
> > devel@rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH] fix memory leak within calloc.c libtests

2021-11-02 Thread Joel Sherrill
This looks good to me.

--joel

On Mon, Nov 1, 2021 at 8:18 PM zack leung  wrote:
>
> bump
>
>
> On Mon, 18 Oct 2021 at 23:46, zack leung  wrote:
>
> > fix came from github code inspector, flagged by one of the analysis that
> > was done
> > ---
> >  testsuites/libtests/POSIX/calloc.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/testsuites/libtests/POSIX/calloc.c
> > b/testsuites/libtests/POSIX/calloc.c
> > index bd04faa800..a7537c8cc4 100644
> > --- a/testsuites/libtests/POSIX/calloc.c
> > +++ b/testsuites/libtests/POSIX/calloc.c
> > @@ -16,6 +16,8 @@ int
> >  main (void)
> >  {
> >void *foo = calloc (42, 43);
> > +  int rc = (foo != NULL);
> > +  free(foo);
> >
> > -  return (foo != NULL);
> > +  return rc;
> >  }
> > --
> > 2.33.0
> >
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH] fix memory leak within calloc.c libtests

2021-11-01 Thread zack leung
bump


On Mon, 18 Oct 2021 at 23:46, zack leung  wrote:

> fix came from github code inspector, flagged by one of the analysis that
> was done
> ---
>  testsuites/libtests/POSIX/calloc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/testsuites/libtests/POSIX/calloc.c
> b/testsuites/libtests/POSIX/calloc.c
> index bd04faa800..a7537c8cc4 100644
> --- a/testsuites/libtests/POSIX/calloc.c
> +++ b/testsuites/libtests/POSIX/calloc.c
> @@ -16,6 +16,8 @@ int
>  main (void)
>  {
>void *foo = calloc (42, 43);
> +  int rc = (foo != NULL);
> +  free(foo);
>
> -  return (foo != NULL);
> +  return rc;
>  }
> --
> 2.33.0
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] fix memory leak within calloc.c libtests

2021-10-18 Thread zack leung
fix came from github code inspector, flagged by one of the analysis that
was done
---
 testsuites/libtests/POSIX/calloc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testsuites/libtests/POSIX/calloc.c
b/testsuites/libtests/POSIX/calloc.c
index bd04faa800..a7537c8cc4 100644
--- a/testsuites/libtests/POSIX/calloc.c
+++ b/testsuites/libtests/POSIX/calloc.c
@@ -16,6 +16,8 @@ int
 main (void)
 {
   void *foo = calloc (42, 43);
+  int rc = (foo != NULL);
+  free(foo);

-  return (foo != NULL);
+  return rc;
 }
-- 
2.33.0
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel