]> git.ipfire.org Git - people/ms/u-boot.git/commit
ext4: free allocations by parse_path()
authorStephen Warren <swarren@nvidia.com>
Sat, 5 Sep 2015 04:03:44 +0000 (22:03 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 11 Sep 2015 21:15:22 +0000 (17:15 -0400)
commit934b14f2bb306dfa1947d30f4df90cdc8b710332
tree3bd473e3222c29442e5b805be80904b6265c9836
parent676505f5ce6c621d8c28958d600dcf92bcf76574
ext4: free allocations by parse_path()

parse_path() malloc()s the entries in the array it's passed. Those
allocations must be free()d by the caller, ext4fs_get_parent_inode_num().
Add code to do this.

For this to work, all the array entries must be dynamically allocated,
rather than a mix of dynamic and static allocations. Fix parse_path() not
to over-write arr[0] with a pointer to statically allocated data.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
fs/ext4/ext4_common.c