sf: sf_ops: Stop leaking memory

It's usually a common pattern to free() the memory that we allocated.
Implement this here to stop leaking memory.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
This commit is contained in:
Marek Vasut 2014-07-12 18:11:31 +05:30 committed by Jagannadha Sutradharudu Teki
parent 25b4adbba0
commit a52a178f0b

View file

@ -421,6 +421,7 @@ int spi_flash_cmd_read_ops(struct spi_flash *flash, u32 offset,
data += read_len;
}
free(cmd);
return ret;
}