[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libvir-list
Subject:    Re: [libvirt PATCH 17/19] commandhelper: Convert printEnvironment to g_auto*
From:       Pavel Hrdina <phrdina () redhat ! com>
Date:       2021-01-29 18:22:12
Message-ID: 20210129182212.GE708623 () antique-laptop
[Download RAW message or body]


On Fri, Jan 29, 2021 at 07:08:27PM +0100, Peter Krempa wrote:
> On Fri, Jan 29, 2021 at 17:16:27 +0100, Tim Wiederhake wrote:
> > Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
> > ---
> >  tests/commandhelper.c | 12 +++---------
> >  1 file changed, 3 insertions(+), 9 deletions(-)
> > 
> > diff --git a/tests/commandhelper.c b/tests/commandhelper.c
> > index e616f92987..26a7de5149 100644
> > --- a/tests/commandhelper.c
> > +++ b/tests/commandhelper.c
> > @@ -108,16 +108,15 @@ static int envsort(const void *a, const void *b)
> >  
> >  static int printEnvironment(FILE *log)
> >  {
> > -    char **newenv;
> > +    g_autofree char **newenv = NULL;
> 
> Per discussion on 4/19, this isn't allowed to link to glib, thus
> g_autofree should not work as it uses g_free internally.

I guess this is my mistake in the meson rewrite. Specifically commit
8fe8df4b2026ca21db123ddc0cdd8451a2e224dd where originally it did not
link to anything but with meson it now can link with a lot of libraries
specified in tests_dep. That probably needs to be fixed to make it work
as expected.

Pavel

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic