Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
create_inode: remove backup definition of __func__
[tools/e2fsprogs.git]
/
misc
/
e4defrag.c
diff --git
a/misc/e4defrag.c
b/misc/e4defrag.c
index
d0eac60
..
3f949d0
100644
(file)
--- a/
misc/e4defrag.c
+++ b/
misc/e4defrag.c
@@
-387,8
+387,10
@@
static int page_in_core(int fd, struct move_extent defrag_data,
*page_num = 0;
*page_num = (length + pagesize - 1) / pagesize;
*vec = (unsigned char *)calloc(*page_num, 1);
*page_num = 0;
*page_num = (length + pagesize - 1) / pagesize;
*vec = (unsigned char *)calloc(*page_num, 1);
- if (*vec == NULL)
+ if (*vec == NULL) {
+ munmap(page, length);
return -1;
return -1;
+ }
/* Get information on whether pages are in core */
if (mincore(page, (size_t)length, *vec) == -1 ||
/* Get information on whether pages are in core */
if (mincore(page, (size_t)length, *vec) == -1 ||