diff options
| author | Colin Ian King <[email protected]> | 2019-07-05 07:26:24 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2019-07-05 16:47:57 +0000 |
| commit | e02d48eaaed77f6c36916a7aa65c451e1f9d9aab (patch) | |
| tree | 59aec3f4273813834a2259005c104c1ec92ff919 /lib/timerqueue.c | |
| parent | btrfs: move the subvolume reservation stuff out of extent-tree.c (diff) | |
| download | kernel-e02d48eaaed77f6c36916a7aa65c451e1f9d9aab.tar.gz kernel-e02d48eaaed77f6c36916a7aa65c451e1f9d9aab.zip | |
btrfs: fix memory leak of path on error return path
Currently if the allocation of roots or tmp_ulist fails the error handling
does not free up the allocation of path causing a memory leak. Fix this and
other similar leaks by moving the call of btrfs_free_path from label out
to label out_free_ulist.
Kudos to David Sterba for spotting the issue in my original fix and suggesting
the correct way to fix the leak and Anand Jain for spotting a double free
issue.
Addresses-Coverity: ("Resource leak")
Fixes: 5911c8fe05c5 ("btrfs: fiemap: preallocate ulists for btrfs_check_shared")
Reviewed-by: Nikolay Borisov <[email protected]>
Signed-off-by: Colin Ian King <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'lib/timerqueue.c')
0 files changed, 0 insertions, 0 deletions
