diff options
author | Wang Shilong <wangsl.fnst@cn.fujitsu.com> | 2013-08-08 01:04:17 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-09-01 08:04:56 -0400 |
commit | a4fdb61e81e73991d919ff0396d256e9e67d2475 (patch) | |
tree | d60e5c1c307a7068868d23130a7a4b679c5c458b /fs/btrfs/backref.c | |
parent | 09fb99a696412ae0fceeafc06c987903416503b9 (diff) |
Btrfs: fix possible memory leak in find_parent_nodes()
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r-- | fs/btrfs/backref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 980e85a264c0..ae798c1d088b 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c | |||
@@ -911,7 +911,6 @@ again: | |||
911 | 911 | ||
912 | while (!list_empty(&prefs)) { | 912 | while (!list_empty(&prefs)) { |
913 | ref = list_first_entry(&prefs, struct __prelim_ref, list); | 913 | ref = list_first_entry(&prefs, struct __prelim_ref, list); |
914 | list_del(&ref->list); | ||
915 | WARN_ON(ref->count < 0); | 914 | WARN_ON(ref->count < 0); |
916 | if (ref->count && ref->root_id && ref->parent == 0) { | 915 | if (ref->count && ref->root_id && ref->parent == 0) { |
917 | /* no parent == root of tree */ | 916 | /* no parent == root of tree */ |
@@ -956,6 +955,7 @@ again: | |||
956 | eie->next = ref->inode_list; | 955 | eie->next = ref->inode_list; |
957 | } | 956 | } |
958 | } | 957 | } |
958 | list_del(&ref->list); | ||
959 | kfree(ref); | 959 | kfree(ref); |
960 | } | 960 | } |
961 | 961 | ||