diff options
author | Dmitry V. Levin <ldv@strace.io> | 2023-12-05 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2023-12-05 21:47:16 +0000 |
commit | be9f2fce28c75e8b700c56c37c7e4c2386f726ec (patch) | |
tree | 826bb72c01df5274eb0d8346132f84d7ebedf486 | |
parent | ebf711d1504258a21753738f99464701b9c719ac (diff) | |
download | pam-be9f2fce28c75e8b700c56c37c7e4c2386f726ec.tar.gz pam-be9f2fce28c75e8b700c56c37c7e4c2386f726ec.tar.bz2 pam-be9f2fce28c75e8b700c56c37c7e4c2386f726ec.zip |
pam_pwhistory: fix memory leak on error path
* modules/pam_pwhistory/pwhistory_config.c (parse_config_file): Free
the result returned by pam_modutil_search_key when it becomes unused.
-rw-r--r-- | modules/pam_pwhistory/pwhistory_config.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/pam_pwhistory/pwhistory_config.c b/modules/pam_pwhistory/pwhistory_config.c index 692cf80e..2f299b54 100644 --- a/modules/pam_pwhistory/pwhistory_config.c +++ b/modules/pam_pwhistory/pwhistory_config.c @@ -124,6 +124,7 @@ parse_config_file(pam_handle_t *pamh, int argc, const char **argv, if (*val != '/') { pam_syslog (pamh, LOG_ERR, "File path should be absolute: %s", val); + free(val); } else { options->filename = val; } |