mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 22:45:27 +00:00
Fix memory leaks
Free buf in the case of an error. Found via cppcheck.
This commit is contained in:
@@ -214,6 +214,7 @@ static int jtagmkI_send(PROGRAMMER * pgm, unsigned char * data, size_t len)
|
||||
if (serial_send(&pgm->fd, buf, len + 2) != 0) {
|
||||
avrdude_message(MSG_INFO, "%s: jtagmkI_send(): failed to send command to serial port\n",
|
||||
progname);
|
||||
free(buf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user