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: https://git.librecmc.org/?a=commitdiff_plain;h=a52a178f0b4dce6a85a45ccea348be92fc7f1b6d;p=oweals%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 ef91b924d7..85cf22d42e 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; }