diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2013-12-12 12:52:00 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-12-12 12:57:27 -0500 |
commit | 85b8f7affa5fadb1972e82e04cc3d1828966b238 (patch) | |
tree | fc25f74b1182c6adb3986183b2fd39014157d330 /lib | |
parent | ddbe78528f664a43c447e5ffeb0b89fe9fed515d (diff) | |
download | android_external_e2fsprogs-85b8f7affa5fadb1972e82e04cc3d1828966b238.tar.gz android_external_e2fsprogs-85b8f7affa5fadb1972e82e04cc3d1828966b238.tar.bz2 android_external_e2fsprogs-85b8f7affa5fadb1972e82e04cc3d1828966b238.zip |
debugfs: don't leak mmp_s memory (on error path)
ext2fs_free_mem() takes a pointer to a pointer, similar to
ext2fs_get_mem(). Improve the documentation, and fix debugfs.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ext2fs/ext2fs.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h index 9f62cbbe..c982327e 100644 --- a/lib/ext2fs/ext2fs.h +++ b/lib/ext2fs/ext2fs.h @@ -1517,7 +1517,7 @@ extern __u64 ext2fs_div64_ceil(__u64 a, __u64 b); #ifndef EXT2_CUSTOM_MEMORY_ROUTINES #include <string.h> /* - * Allocate memory + * Allocate memory. The 'ptr' arg must point to a pointer. */ _INLINE_ errcode_t ext2fs_get_mem(unsigned long size, void *ptr) { @@ -1564,7 +1564,7 @@ _INLINE_ errcode_t ext2fs_get_arrayzero(unsigned long count, } /* - * Free memory + * Free memory. The 'ptr' arg must point to a pointer. */ _INLINE_ errcode_t ext2fs_free_mem(void *ptr) { @@ -1578,7 +1578,7 @@ _INLINE_ errcode_t ext2fs_free_mem(void *ptr) } /* - * Resize memory + * Resize memory. The 'ptr' arg must point to a pointer. */ _INLINE_ errcode_t ext2fs_resize_mem(unsigned long EXT2FS_ATTR((unused)) old_size, unsigned long size, void *ptr) |