-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pam_exec: arggv not free'd on error #444
Comments
Thanks for reporting. What's worse is the unchecked return value of strdup in linux-pam/modules/pam_exec/pam_exec.c Line 421 in 2f28987
|
Heh, I thought about that, too, but it's nice to clean up memory before exit() to keep valgrind reports short and sweet. It's up to you what you'd rather do, but I'd argue for consistency either way. I can't believe I looked right past that unchecked Thanks |
@thkukuk Thorsten, I think it's your code, would you prefer freeing |
It's not only arggv which is not free'd, but freeing envlist also leaves a lot of unreachable allocations behind. |
linux-pam/modules/pam_exec/pam_exec.c
Line 416 in 2f28987
Hello, the
arggv
array and referenced strings aren't free'd on any of the error paths. This is probably not a big deal but does seem out of character given other things are free'd in the same error paths.Thanks
The text was updated successfully, but these errors were encountered: