cfg: ftdi icdi enable srst open drain config
[fw/openocd] / src / flash / mflash.c
index 3d927c4549375349ccb3423a43c7093d4d8de724..4ef8cb69eedad2b8171bad4e9bd74b7171cb3097 100644 (file)
@@ -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)