X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fflash%2Fmflash.c;h=4ef8cb69eedad2b8171bad4e9bd74b7171cb3097;hp=3d927c4549375349ccb3423a43c7093d4d8de724;hb=cf8a3c3d7075abad3c88cd604f8add4d06898abc;hpb=1e9f8836a1af5b35b5950a24b8f19b38318df532 diff --git a/src/flash/mflash.c b/src/flash/mflash.c index 3d927c4549..4ef8cb69ee 100644 --- a/src/flash/mflash.c +++ b/src/flash/mflash.c @@ -510,7 +510,7 @@ static int mg_mflash_read_sects(void *buff, uint32_t sect_num, uint32_t sect_cnt } static int mg_mflash_do_write_sects(void *buff, uint32_t sect_num, uint32_t sect_cnt, - mg_io_type_cmd cmd) + uint8_t cmd) { uint32_t i, address; int ret; @@ -770,6 +770,7 @@ COMMAND_HANDLER(mg_write_cmd) int retval = fileio_size(&fileio, &filesize); if (retval != ERROR_OK) { fileio_close(&fileio); + free(buffer); return retval; } @@ -1395,7 +1396,7 @@ COMMAND_HANDLER(mg_bank_cmd) mflash_bank = calloc(sizeof(struct mflash_bank), 1); COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], mflash_bank->base); - /* / @todo Verify how this parsing should work, then document it. */ + /** @todo Verify how this parsing should work, then document it. */ char *str; mflash_bank->rst_pin.num = strtoul(CMD_ARGV[2], &str, 0); if (*str)