X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Futil-hashtable.c;h=9ee832bc7b6d04a5975e9cd144d0851492aea4df;hb=f4b69a7f12e47d146be4cecf1d46dfd37f87d89a;hp=beb7bbe97f50005f32f34ca98ce17d57c731788d;hpb=07aa8f3c18a33af0961e7546980a63ab5f6fba4f;p=palacios.git diff --git a/linux_module/util-hashtable.c b/linux_module/util-hashtable.c index beb7bbe..9ee832b 100644 --- a/linux_module/util-hashtable.c +++ b/linux_module/util-hashtable.c @@ -203,6 +203,11 @@ struct hashtable * palacios_create_htable(uint_t min_size, } } + if (prime_index==prime_table_len) { + // cannot build large enough hash table + return NULL; + } + htable = (struct hashtable *)palacios_alloc(sizeof(struct hashtable)); if (htable == NULL) {