summaryrefslogtreecommitdiff
path: root/drivers/xen/pvcalls-front.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen/pvcalls-front.c')
-rw-r--r--drivers/xen/pvcalls-front.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
index 307861f9e485..8a249c95c193 100644
--- a/drivers/xen/pvcalls-front.c
+++ b/drivers/xen/pvcalls-front.c
@@ -343,6 +343,9 @@ int pvcalls_front_socket(struct socket *sock)
static void free_active_ring(struct sock_mapping *map)
{
+ if (!map->active.ring)
+ return;
+
free_pages((unsigned long)map->active.data.in,
map->active.ring->ring_order);
free_page((unsigned long)map->active.ring);