From 07cc61bfc0e5d9da80e353365717d45d29db0081 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 21 Jun 2013 09:20:08 +0300 Subject: xen-netback: double free on unload There is a typo here, "i" vs "j", so we would crash on module_exit(). Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller --- drivers/net/xen-netback/netback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/xen-netback') diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index a0b50ad2ef31..130bcb217d2c 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -1968,8 +1968,8 @@ static void __exit netback_fini(void) del_timer_sync(&netbk->net_timer); kthread_stop(netbk->task); for (j = 0; j < MAX_PENDING_REQS; j++) { - if (netbk->mmap_pages[i]) - __free_page(netbk->mmap_pages[i]); + if (netbk->mmap_pages[j]) + __free_page(netbk->mmap_pages[j]); } } -- cgit v1.2.3