X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=linux_module%2Futil-hashtable.c;h=9ee832bc7b6d04a5975e9cd144d0851492aea4df;hp=beb7bbe97f50005f32f34ca98ce17d57c731788d;hb=471edd59ca70371e97cbad759e1710433f35990d;hpb=9452a96dc7cfcadaa81a32a36acc1a95bc1844db 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) {