mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-24 01:01:15 -06:00
Firmware updater: Fix a race condition
avrdude: Handle OOM with configurable handler
This commit is contained in:
parent
bd667aad6e
commit
60a0375ff9
14 changed files with 193 additions and 67 deletions
|
|
@ -85,9 +85,10 @@ static void wiring_setup(PROGRAMMER * pgm)
|
|||
* Now prepare our data
|
||||
*/
|
||||
if ((mycookie = malloc(sizeof(struct wiringpdata))) == 0) {
|
||||
avrdude_message(MSG_INFO, "%s: wiring_setup(): Out of memory allocating private data\n",
|
||||
progname);
|
||||
exit(1);
|
||||
// avrdude_message(MSG_INFO, "%s: wiring_setup(): Out of memory allocating private data\n",
|
||||
// progname);
|
||||
// exit(1);
|
||||
avrdude_oom("wiring_setup(): Out of memory allocating private data\n");
|
||||
}
|
||||
memset(mycookie, 0, sizeof(struct wiringpdata));
|
||||
WIRINGPDATA(mycookie)->snoozetime = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue