mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-27 06:50:21 +00:00
AVR_ISP: fix NULL pointer dereference
This commit is contained in:
parent
c2fa8a2b18
commit
243fbfc19a
2 changed files with 2 additions and 0 deletions
|
@ -153,6 +153,7 @@ bool avr_isp_auto_set_spi_speed_start_pmode(AvrIsp* instance) {
|
|||
}
|
||||
}
|
||||
if(instance->spi) avr_isp_spi_sw_free(instance->spi);
|
||||
instance->spi = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -318,6 +318,7 @@ static bool avr_isp_prog_auto_set_spi_speed_start_pmode(AvrIspProg* instance) {
|
|||
}
|
||||
}
|
||||
if(instance->spi) avr_isp_spi_sw_free(instance->spi);
|
||||
instance->spi = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue