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

Reviewed by:	des
This commit is contained in:
jmallett 2002-05-22 23:18:25 +00:00
parent 981165838b
commit f49de03759

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