From: Wang Shilong Date: Tue, 28 Jan 2014 11:13:38 +0000 (+0800) Subject: Btrfs: fix memory leaks on walking backrefs failure X-Git-Tag: v3.14-rc1~29^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f05c474688762f186b16a26366755b6ef0bfed0c;p=pandora-kernel.git Btrfs: fix memory leaks on walking backrefs failure When walking backrefs, we may iterate every inode's extent and add/merge them into ulist, and the caller will free memory from ulist. However, if we fail to allocate inode's extents element memory or ulist_add() fail to allocate memory, we won't add allocated memory into ulist, and the caller won't free some allocated memory thus memory leaks happen. Signed-off-by: Wang Shilong Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- Reading git-diff-tree failed