mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-27 00:24:00 -06:00
avrdude: Fix serial port handle leak in many places
This commit is contained in:
parent
a61a72cc94
commit
b7941345d1
5 changed files with 38 additions and 12 deletions
|
@ -158,8 +158,10 @@ static int arduino_open(PROGRAMMER * pgm, char * port)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (stk500_getsync(pgm) < 0)
|
||||
if (stk500_getsync(pgm) < 0) {
|
||||
serial_close(&pgm->fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue