Add missing free()'s

This commit is contained in:
MCUdude 2022-03-18 21:20:58 +01:00
parent 6a5988ad64
commit 426ea1fa78
1 changed files with 2 additions and 0 deletions

View File

@ -378,6 +378,7 @@ static int cmd_write(PROGRAMMER * pgm, struct avrpart * p,
if (*end_ptr || (end_ptr == argv[3])) { if (*end_ptr || (end_ptr == argv[3])) {
avrdude_message(MSG_INFO, "%s (write ...): can't parse address \"%s\"\n", avrdude_message(MSG_INFO, "%s (write ...): can't parse address \"%s\"\n",
progname, argv[3]); progname, argv[3]);
free(buf);
return -1; return -1;
} }
} else { } else {
@ -503,6 +504,7 @@ static int cmd_write(PROGRAMMER * pgm, struct avrpart * p,
avrdude_message(MSG_INFO, "%s (write): selected address and # bytes exceed " avrdude_message(MSG_INFO, "%s (write): selected address and # bytes exceed "
"range for %s memory\n", "range for %s memory\n",
progname, memtype); progname, memtype);
free(buf);
return -1; return -1;
} }