From a52a178f0b4dce6a85a45ccea348be92fc7f1b6d Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 12 Jul 2014 18:11:31 +0530 Subject: 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 Cc: Michal Simek Reviewed-by: Jagannadha Sutradharudu Teki --- drivers/mtd/spi/sf_ops.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') 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; } -- cgit v1.1