From: Kyle Hale Date: Mon, 24 Mar 2014 21:42:39 +0000 (-0500) Subject: add ability to destroy hashtable iterators X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=7995b5188875e3df8d792691609b5029630a3fb0 add ability to destroy hashtable iterators --- diff --git a/palacios/include/palacios/vmm_hashtable.h b/palacios/include/palacios/vmm_hashtable.h index 79f5f05..2806632 100644 --- a/palacios/include/palacios/vmm_hashtable.h +++ b/palacios/include/palacios/vmm_hashtable.h @@ -181,6 +181,7 @@ struct hashtable_iter { struct hashtable_iter * v3_create_htable_iter(struct hashtable * htable); +void v3_destroy_htable_iter(struct hashtable_iter * iter); /* - return the value of the (key,value) pair at the current position */ //extern inline diff --git a/palacios/src/palacios/vmm_hashtable.c b/palacios/src/palacios/vmm_hashtable.c index 00e6f52..fd8f3a2 100644 --- a/palacios/src/palacios/vmm_hashtable.c +++ b/palacios/src/palacios/vmm_hashtable.c @@ -733,6 +733,11 @@ int v3_htable_iter_search(struct hashtable_iter * iter, return 0; } +void v3_destroy_htable_iter(struct hashtable_iter * iter) { + if (iter) { + V3_Free(iter); + } +}