mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-27 03:44:53 +03:00
avrdude: Fix serial port handle leak in many places
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user