aboutsummaryrefslogtreecommitdiffstats
path: root/epan/circuit.c
diff options
context:
space:
mode:
authorkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>2009-09-06 18:25:23 +0000
committerkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>2009-09-06 18:25:23 +0000
commit08963ce918c7b26797ef11db151e4306273b264b (patch)
tree3906bcb3782e7eeaccdf0142093b63c249a57593 /epan/circuit.c
parente0474c2345e6247721851cd854be9824fcf46c21 (diff)
Split a bunch of init routines into init() and cleanup(). This allows us to free memory properly on shutdown.
This is an initial step. There's still some work to do. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29754 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/circuit.c')
-rw-r--r--epan/circuit.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/epan/circuit.c b/epan/circuit.c
index 73dbbce2c6..7228fd5f42 100644
--- a/epan/circuit.c
+++ b/epan/circuit.c
@@ -74,16 +74,24 @@ circuit_match(gconstpointer v, gconstpointer w)
}
/*
- * Initialize some variables every time a file is loaded or re-loaded.
- * Destroy all existing circuits, and create a new hash table
- * for the circuits in the new file.
+ * Destroy all existing circuits.
*/
void
-circuit_init(void)
+circuit_cleanup(void)
{
if (circuit_hashtable != NULL)
g_hash_table_destroy(circuit_hashtable);
+ circuit_hashtable = NULL;
+}
+
+/*
+ * Initialize some variables every time a file is loaded or re-loaded.
+ * Create a new hash table for the circuits in the new file.
+ */
+void
+circuit_init(void)
+{
/*
* Free up any space allocated for circuit protocol data
* areas.