[PATCH] IB/mthca: Fix memory leak on error path

Free page_list buffer on error path of mthca_reg_phys_mr().

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Roland Dreier 2005-06-27 14:36:44 -07:00 committed by Linus Torvalds
parent d56d6f9502
commit 761f9eb8c3
1 changed files with 1 additions and 0 deletions

View File

@ -559,6 +559,7 @@ static struct ib_mr *mthca_reg_phys_mr(struct ib_pd *pd,
convert_access(acc), mr);
if (err) {
kfree(page_list);
kfree(mr);
return ERR_PTR(err);
}