From: Marek Vasut Date: Sat, 12 Jul 2014 12:41:31 +0000 (+0530) Subject: sf: sf_ops: Stop leaking memory X-Git-Tag: v2014.10-rc1~6^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a52a178f0b4dce6a85a45ccea348be92fc7f1b6d;p=platform%2Fkernel%2Fu-boot.git 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 --- 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; }