diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2024-01-04 18:24:00 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2024-01-08 20:59:23 +0000 |
commit | dfc2532e84cadc9b2a489de9b8b1cd5fb6679fb3 (patch) | |
tree | f8fecbafbf99e01c8732f56ce15a527a4d083d2e /modules | |
parent | d3b8c0723d0d691585474b0e14982f62b115a672 (diff) | |
download | pam-dfc2532e84cadc9b2a489de9b8b1cd5fb6679fb3.tar.gz pam-dfc2532e84cadc9b2a489de9b8b1cd5fb6679fb3.tar.bz2 pam-dfc2532e84cadc9b2a489de9b8b1cd5fb6679fb3.zip |
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")
Diffstat (limited to 'modules')
-rw-r--r-- | modules/pam_unix/support.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |