projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25b4adb
)
sf: sf_ops: Stop leaking memory
author
Marek Vasut
<marex@denx.de>
Sat, 12 Jul 2014 12:41:31 +0000
(18:11 +0530)
committer
Jagannadha Sutradharudu Teki
<jaganna@xilinx.com>
Tue, 5 Aug 2014 18:48:01 +0000
(
00:18
+0530)
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>
drivers/mtd/spi/sf_ops.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/spi/sf_ops.c
b/drivers/mtd/spi/sf_ops.c
index ef91b924d7d69f75cb123b8e5a9385c090013d5a..85cf22d42ecd08761a149639ddbc2dda47ea590a 100644
(file)
--- 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;
}