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 <mprivozn(a)redhat.com>
>
> Signed-off-by: Michal Privoznik <mprivozn(a)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.
Michal