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 /drivers/mtd | |
parent | 25b4adbba018633b943a99322bfb2fb819c0bafb (diff) |
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>
Diffstat (limited to 'drivers/mtd')
-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 ef91b924d7d..85cf22d42ec 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; } |