projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
206c546
)
Fix memory leak on tmp_buf
author
Colin Ian King
<colin.king@canonical.com>
Mon, 14 Nov 2016 00:05:37 +0000
(
00:05
+0000)
committer
Colin Ian King
<colin.king@canonical.com>
Mon, 14 Nov 2016 00:05:37 +0000
(
00:05
+0000)
tmp_buf is allocated but not free'd, causing a minor memory leak
Signed-off-by: Colin Ian King <colin.king@canonical.com>
oslib/libmtd.c
patch
|
blob
|
blame
|
history
diff --git
a/oslib/libmtd.c
b/oslib/libmtd.c
index 5b22d6a8abb453cfd015be3f3f1ea8aef35d4e82..24e9db9cf062da307cd50cc11c17416152efdc73 100644
(file)
--- a/
oslib/libmtd.c
+++ b/
oslib/libmtd.c
@@
-1116,6
+1116,7
@@
static int legacy_auto_oob_layout(const struct mtd_dev_info *mtd, int fd,
len = mtd->oob_size - start;
memcpy(oob + start, tmp_buf + start, len);
}
+ free(tmp_buf);
return 0;
}