From: Alexander Block Date: Sat, 28 Jul 2012 12:13:35 +0000 (+0200) Subject: Btrfs: fix memory leak for name_cache in send/receive X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=17589bd96eeb7c2ef2d3baeb05005a24932cd1e9;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Btrfs: fix memory leak for name_cache in send/receive When everything is done, name_cache_free is called which however forgot to call kfree on the cache entries. Signed-off-by: Alexander Block --- diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 68b2543e5d6c..9cee678c0fb6 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -1822,6 +1822,7 @@ static void name_cache_free(struct send_ctx *sctx) list_for_each_entry_safe(nce, tmp, &sctx->name_cache_list, list) { name_cache_delete(sctx, nce); + kfree(nce); } }