lib: Fix possible dereference in fpi_ssm_next_state()
libfprint/fpi-ssm.c:244:9: warning: Access to field 'completed' results in a dereference of a null pointer (loaded from variable 'machine') BUG_ON(machine->completed); ^~~~~~~~~~~~~~~~~~ libfprint/fpi-log.h:84:6: note: expanded from macro 'BUG_ON' if (condition) { \ ^~~~~~~~~
This commit is contained in:
parent
3cbc908a6e
commit
6d47c44335
1 changed files with 2 additions and 0 deletions
|
@ -241,6 +241,8 @@ void fpi_ssm_mark_failed(fpi_ssm *machine, int error)
|
|||
*/
|
||||
void fpi_ssm_next_state(fpi_ssm *machine)
|
||||
{
|
||||
g_return_if_fail (machine != NULL);
|
||||
|
||||
BUG_ON(machine->completed);
|
||||
machine->cur_state++;
|
||||
if (machine->cur_state == machine->nr_states) {
|
||||
|
|
Loading…
Reference in a new issue