mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-19 16:23:29 +00:00
Free old_pwd only in the code path where it has been allocated.
Reviewed by: des
This commit is contained in:
parent
3549859680
commit
816c6c91e2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97147
|
@ -420,6 +420,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags,
|
|||
retval = PAM_SERVICE_ERR;
|
||||
}
|
||||
#endif
|
||||
free(old_pwd);
|
||||
}
|
||||
else {
|
||||
/* Very bad juju */
|
||||
|
@ -427,7 +428,6 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags,
|
|||
PAM_LOG("Illegal 'flags'");
|
||||
}
|
||||
|
||||
free(old_pwd);
|
||||
return (retval);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue