mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-31 17:12:56 +00:00
Firmware updater: Fix a race condition
avrdude: Handle OOM with configurable handler
This commit is contained in:
@@ -172,9 +172,10 @@ PROGRAMMER * pgm_dup(const PROGRAMMER * const src)
|
||||
for (ln = lfirst(src->usbpid); ln; ln = lnext(ln)) {
|
||||
int *ip = malloc(sizeof(int));
|
||||
if (ip == NULL) {
|
||||
avrdude_message(MSG_INFO, "%s: out of memory allocating programmer structure\n",
|
||||
progname);
|
||||
exit(1);
|
||||
// avrdude_message(MSG_INFO, "%s: out of memory allocating programmer structure\n",
|
||||
// progname);
|
||||
// exit(1);
|
||||
avrdude_oom("out of memory allocating programmer structure\n");
|
||||
}
|
||||
*ip = *(int *) ldata(ln);
|
||||
ladd(pgm->usbpid, ip);
|
||||
|
||||
Reference in New Issue
Block a user