From 185d5c2f04b6e4d64555ccb57bf3172daa86e00f Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 14 Aug 2005 01:48:43 +0000 Subject: giop allocates only and never releases the memory from the gmemchunk so replace it with equivalen g_malloc() calls and get rid of the gmemchunks svn path=/trunk/; revision=15350 --- epan/dissectors/packet-giop.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'epan/dissectors') diff --git a/epan/dissectors/packet-giop.c b/epan/dissectors/packet-giop.c index fb68597b8f..9d6dd98815 100644 --- a/epan/dissectors/packet-giop.c +++ b/epan/dissectors/packet-giop.c @@ -684,8 +684,6 @@ struct giop_module_val { }; GHashTable *giop_module_hash = NULL; /* hash */ -GMemChunk *giop_module_keys = NULL; /* key storage */ -GMemChunk *giop_module_vals = NULL; /* val storage */ /* @@ -1061,10 +1059,10 @@ void register_giop_user_module(giop_sub_dissector_t *sub, gchar *name, gchar *mo printf("giop:register_module: Module sub dissector name is %s \n", name); #endif - new_module_key = g_mem_chunk_alloc(giop_module_keys); + new_module_key = g_malloc(sizeof(struct giop_module_key)); new_module_key->module = module; /* save Module or interface name from IDL */ - module_val = g_mem_chunk_alloc(giop_module_vals); + module_val = g_malloc(sizeof(struct giop_module_val)); module_val->subh = g_malloc(sizeof (giop_sub_handle_t)); /* init subh */ @@ -4237,16 +4235,6 @@ proto_register_giop (void) giop_module_hash = g_hash_table_new(giop_hash_module_hash, giop_hash_module_equal); - giop_module_keys = g_mem_chunk_new("giop_module_keys", - sizeof(struct giop_module_key), - giop_module_init_count * sizeof(struct giop_module_key), - G_ALLOC_AND_FREE); - - giop_module_vals = g_mem_chunk_new("giop_module_vals", - sizeof(struct giop_module_val), - giop_module_init_count * sizeof(struct giop_module_val), - G_ALLOC_AND_FREE); - } -- cgit v1.2.1