Free old_pwd only in the code path where it has been allocated.
Reviewed by: des
This commit is contained in:
parent
981165838b
commit
f49de03759
@ -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…
x
Reference in New Issue
Block a user