mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-25 01:31:14 -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
|
|
@ -63,9 +63,10 @@ struct pdata
|
|||
static void butterfly_setup(PROGRAMMER * pgm)
|
||||
{
|
||||
if ((pgm->cookie = malloc(sizeof(struct pdata))) == 0) {
|
||||
avrdude_message(MSG_INFO, "%s: butterfly_setup(): Out of memory allocating private data\n",
|
||||
progname);
|
||||
exit(1);
|
||||
// avrdude_message(MSG_INFO, "%s: butterfly_setup(): Out of memory allocating private data\n",
|
||||
// progname);
|
||||
// exit(1);
|
||||
avrdude_oom("butterfly_setup(): Out of memory allocating private data\n");
|
||||
}
|
||||
memset(pgm->cookie, 0, sizeof(struct pdata));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue