From dfc2532e84cadc9b2a489de9b8b1cd5fb6679fb3 Mon Sep 17 00:00:00 2001 From: Christian Göttsche Date: Thu, 4 Jan 2024 18:24:00 +0100 Subject: pam_unix: fix memory leak The the allocated line buffer on success. Reported by GCC analyzer. Fixes: 4a2d60e9 ("pam_unix: use getline in _unix_getpwnam") --- modules/pam_unix/support.c | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/pam_unix') diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c index a4e24210..546ef820 100644 --- a/modules/pam_unix/support.c +++ b/modules/pam_unix/support.c @@ -489,6 +489,7 @@ int _unix_getpwnam(pam_handle_t *pamh, const char *name, } } + _pam_drop(buf); return matched; fail: _pam_drop(buf); -- cgit v1.2.3