Free old_pwd only in the code path where it has been allocated.

Reviewed by:	des
This commit is contained in:
Juli Mallett 2002-05-22 23:18:25 +00:00
parent 3549859680
commit 816c6c91e2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97147

View file

@ -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);
}