upekts: Fix use-after-free in an error condition
The callback function would continue processing even after having failed the SSM already. This causes further invalid operations on the SSM. This error was found using a coverity scan.
This commit is contained in:
parent
3b47113122
commit
88461d53ec
1 changed files with 4 additions and 2 deletions
|
@ -902,8 +902,10 @@ enroll_start_sm_cb_msg28 (FpDevice *dev,
|
|||
FpiSsm *ssm = user_data;
|
||||
|
||||
if (error)
|
||||
fpi_ssm_mark_failed (ssm, error);
|
||||
if (type != READ_MSG_RESPONSE)
|
||||
{
|
||||
fpi_ssm_mark_failed (ssm, error);
|
||||
}
|
||||
else if (type != READ_MSG_RESPONSE)
|
||||
{
|
||||
fp_err ("expected response, got %d seq=%x", type, seq);
|
||||
fpi_ssm_mark_failed (ssm, fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
|
|
Loading…
Reference in a new issue