mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-19 11:21:39 +03:00
AVR_ISP: fix NULL pointer dereference
This commit is contained in:
parent
c2fa8a2b18
commit
243fbfc19a
@ -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);
|
if(instance->spi) avr_isp_spi_sw_free(instance->spi);
|
||||||
|
instance->spi = NULL;
|
||||||
return false;
|
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);
|
if(instance->spi) avr_isp_spi_sw_free(instance->spi);
|
||||||
|
instance->spi = NULL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user