OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da3588b
)
mmc: block: fix logical error to avoid memory leak
author
Liu, Changcheng
<changcheng.liu@intel.com>
Sat, 16 Dec 2017 15:15:45 +0000
(23:15 +0800)
committer
Ulf Hansson
<ulf.hansson@linaro.org>
Mon, 18 Dec 2017 13:02:16 +0000
(14:02 +0100)
If the MMC_DRV_OP_GET_EXT_CSD request completes successfully, then
ext_csd must be freed, but in one case it was not. Fix that.
Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/block.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/core/block.c
b/drivers/mmc/core/block.c
index
654fc1e
..
20135a5
100644
(file)
--- a/
drivers/mmc/core/block.c
+++ b/
drivers/mmc/core/block.c
@@
-2795,6
+2795,7
@@
static int mmc_ext_csd_open(struct inode *inode, struct file *filp)
if (n != EXT_CSD_STR_LEN) {
err = -EINVAL;
+ kfree(ext_csd);
goto out_free;
}