diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-08-12 22:12:32 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-08-12 22:12:32 +0000 |
commit | 7a2951c4c30755923b634dd932daf16628b5af95 (patch) | |
tree | 88bd89ae3b8881a9277643b26872e708b6f48d3d /epan/dissectors/packet-x11.c | |
parent | e9761318d874a4934e3d62ddf21ed7ee82f3f62c (diff) |
more gmemchunk->se_alloc() improvements
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15319 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-x11.c')
-rw-r--r-- | epan/dissectors/packet-x11.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/epan/dissectors/packet-x11.c b/epan/dissectors/packet-x11.c index ebd0b00d59..f8f8365558 100644 --- a/epan/dissectors/packet-x11.c +++ b/epan/dissectors/packet-x11.c @@ -67,6 +67,7 @@ #include <epan/prefs.h> #include "packet-frame.h" #include "packet-x11-keysymdef.h" +#include <epan/emem.h> #define cVALS(x) (const value_string*)(x) @@ -147,7 +148,6 @@ typedef struct _x11_conv_data { } request; } x11_conv_data_t; -static GMemChunk *x11_state_chunk = NULL; static x11_conv_data_t *x11_conv_data_list; /* Initialize the protocol and registered fields */ @@ -2494,13 +2494,6 @@ static void x11_init_protocol(void) g_hash_table_destroy(state->valtable); } x11_conv_data_list = NULL; - if (x11_state_chunk != NULL) - g_mem_chunk_destroy(x11_state_chunk); - - x11_state_chunk = g_mem_chunk_new("x11_state_chunk", - sizeof (x11_conv_data_t), - 128 * sizeof (x11_conv_data_t), - G_ALLOC_ONLY); } /************************************************************************ @@ -4374,7 +4367,7 @@ x11_stateinit(conversation_t *conversation) static x11_conv_data_t stateinit; int i = 0; - state = g_mem_chunk_alloc(x11_state_chunk); + state = se_alloc(sizeof (x11_conv_data_t)); *state = stateinit; state->next = x11_conv_data_list; x11_conv_data_list = state; |