diff options
-rw-r--r-- | xen/common/tmem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xen/common/tmem.c b/xen/common/tmem.c index 5f27ff019f..835c257e5f 100644 --- a/xen/common/tmem.c +++ b/xen/common/tmem.c @@ -1870,6 +1870,8 @@ static NOINLINE int do_tmem_destroy_pool(uint32_t pool_id) if ( client->pools == NULL ) return 0; + if ( pool_id >= MAX_POOLS_PER_DOMAIN ) + return 0; if ( (pool = client->pools[pool_id]) == NULL ) return 0; client->pools[pool_id] = NULL; |