From 19b5f1e0a61d9a7e62cc93f17b276f98cc87a1aa Mon Sep 17 00:00:00 2001 From: robi Date: Mon, 30 May 2011 22:13:12 +0000 Subject: memory leak ext4 --- src/block.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/block.c b/src/block.c index 66bad23..f07e0bc 100644 --- a/src/block.c +++ b/src/block.c @@ -79,7 +79,9 @@ struct ext2_extent_handle { struct extent_path *path; }; -// Leave the inode intact because it was allocated by new (C++) + + +// Leave the inode intact void local_ext2fs_extent_free(ext2_extent_handle_t handle) { int i; @@ -87,10 +89,10 @@ void local_ext2fs_extent_free(ext2_extent_handle_t handle) if (!handle) return; - //if (handle->inode) - // ext2fs_free_mem(&handle->inode); +// if (handle->inode) +// ext2fs_free_mem(&handle->inode); if (handle->path) { - for (i=1; i < handle->max_depth; i++) { + for (i=1; i <= handle->max_depth; i++) { if (handle->path[i].buf) ext2fs_free_mem(&handle->path[i].buf); } -- cgit v1.2.3