Skip to content

Commit

Permalink
Btrfs: fix memory leak for name_cache in send/receive
Browse files Browse the repository at this point in the history
When everything is done, name_cache_free is called which however
forgot to call kfree on the cache entries.

Signed-off-by: Alexander Block <ablock84@googlemail.com>
  • Loading branch information
Alexander Block authored and Chris Mason committed Oct 1, 2012
1 parent adbe7fb commit 17589bd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/btrfs/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 17589bd

Please sign in to comment.