diff options
-rw-r--r-- | arch/x86/xen/grant-table.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/xen/grant-table.c b/arch/x86/xen/grant-table.c index 103c93f874b2..c98583588580 100644 --- a/arch/x86/xen/grant-table.c +++ b/arch/x86/xen/grant-table.c | |||
@@ -162,14 +162,15 @@ static int __init xlated_setup_gnttab_pages(void) | |||
162 | rc = arch_gnttab_map_shared(pfns, nr_grant_frames, nr_grant_frames, | 162 | rc = arch_gnttab_map_shared(pfns, nr_grant_frames, nr_grant_frames, |
163 | &xen_auto_xlat_grant_frames.vaddr); | 163 | &xen_auto_xlat_grant_frames.vaddr); |
164 | 164 | ||
165 | kfree(pages); | ||
166 | if (rc) { | 165 | if (rc) { |
167 | pr_warn("%s Couldn't map %ld pfns rc:%d\n", __func__, | 166 | pr_warn("%s Couldn't map %ld pfns rc:%d\n", __func__, |
168 | nr_grant_frames, rc); | 167 | nr_grant_frames, rc); |
169 | free_xenballooned_pages(nr_grant_frames, pages); | 168 | free_xenballooned_pages(nr_grant_frames, pages); |
169 | kfree(pages); | ||
170 | kfree(pfns); | 170 | kfree(pfns); |
171 | return rc; | 171 | return rc; |
172 | } | 172 | } |
173 | kfree(pages); | ||
173 | 174 | ||
174 | xen_auto_xlat_grant_frames.pfn = pfns; | 175 | xen_auto_xlat_grant_frames.pfn = pfns; |
175 | xen_auto_xlat_grant_frames.count = nr_grant_frames; | 176 | xen_auto_xlat_grant_frames.count = nr_grant_frames; |