diff options
author | Marek Vasut <marex@denx.de> | 2014-07-12 18:11:31 +0530 |
---|---|---|
committer | Jagannadha Sutradharudu Teki <jaganna@xilinx.com> | 2014-08-06 00:18:01 +0530 |
commit | a52a178f0b4dce6a85a45ccea348be92fc7f1b6d (patch) | |
tree | 1eded5df5766c279cbc454407d6d3672225c0d65 | |
parent | 25b4adbba018633b943a99322bfb2fb819c0bafb (diff) | |
download | u-boot-imx-a52a178f0b4dce6a85a45ccea348be92fc7f1b6d.zip u-boot-imx-a52a178f0b4dce6a85a45ccea348be92fc7f1b6d.tar.gz u-boot-imx-a52a178f0b4dce6a85a45ccea348be92fc7f1b6d.tar.bz2 |
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>
-rw-r--r-- | drivers/mtd/spi/sf_ops.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c index ef91b92..85cf22d 100644 --- a/drivers/mtd/spi/sf_ops.c +++ b/drivers/mtd/spi/sf_ops.c @@ -421,6 +421,7 @@ int spi_flash_cmd_read_ops(struct spi_flash *flash, u32 offset, data += read_len; } + free(cmd); return ret; } |