[PATCH] nis: Fix a memory leak in nis_creategroup when malloc fails
Jiri Stransky
jistr@redhat.com
Tue Jun 23 14:15:25 GMT 2026
The zo_domain field was missing from the list of fields to be freed.
---
nis/nis_creategroup.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/nis/nis_creategroup.c b/nis/nis_creategroup.c
index ea6fc61b08..167c07a123 100644
--- a/nis/nis_creategroup.c
+++ b/nis/nis_creategroup.c
@@ -60,6 +60,7 @@ nis_creategroup (const_nis_name group, unsigned int flags)
free (obj->zo_group);
free (obj->zo_owner);
free (obj->zo_name);
+ free (obj->zo_domain);
free (obj);
return NIS_NOMEMORY;
}
--
2.54.0
More information about the Libc-alpha
mailing list