On Thu, May 22, 2025 at 15:09:24 +0200, Michal Prívozník wrote: > On 5/22/25 15:00, Peter Krempa wrote: > > On Thu, May 22, 2025 at 14:25:14 +0200, Michal Privoznik via Devel wrote: > >> From: Michal Privoznik <mpriv...@redhat.com> > >> > >> Signed-off-by: Michal Privoznik <mpriv...@redhat.com> > >> --- > >> tools/nss/libvirt_nss.c | 15 +++++---------- > >> 1 file changed, 5 insertions(+), 10 deletions(-) > > > > IIRC the nss plugin was meant to be kept free of both the libvirt > > library and glib as it's actually linked into the address space of other > > processes. > > > >> > >> diff --git a/tools/nss/libvirt_nss.c b/tools/nss/libvirt_nss.c > >> index 25e2ec0642..8460b63228 100644 > >> --- a/tools/nss/libvirt_nss.c > >> +++ b/tools/nss/libvirt_nss.c > >> @@ -134,7 +134,7 @@ findLease(const char *name, > >> > >> DEBUG("Dir: %s", leaseDir); > >> while ((entry = readdir(dir)) != NULL) { > >> - char *path; > >> + g_autofree char *path = NULL; > > > > So while we're okay using __attribute__(cleanup) I don't think we can > > use glib here. > > > > Please see my previous patch to understand why this is NOT grabbing glib in.
I see. Well it's extremely confusing to name the macro the same as in glib. As you can clearly see it makes it seem that glib is used. I suggest you pick a different name.