diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2006-02-13 23:20:38 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2006-02-13 23:20:38 +0000 |
commit | 8e121c003c45d75b9427671bdb060604c8d5bb7b (patch) | |
tree | 3aa7762f60fba8e739bb43fb330cdc44789595ce /gtk | |
parent | a086a018dc28fc2a5af446274f07ae838d488370 (diff) |
Don't se_leak expert_info records.
se_alloc them where and if needed, not every time expert_set_info_vformat is called.
svn path=/trunk/; revision=17293
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/expert_dlg.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk/expert_dlg.c b/gtk/expert_dlg.c index 85f2ed598c..e8af906640 100644 --- a/gtk/expert_dlg.c +++ b/gtk/expert_dlg.c @@ -137,10 +137,12 @@ void expert_dlg_reset(void *tapdata) int expert_dlg_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pointer) { - expert_info_t *ei = (expert_info_t *) pointer; + expert_info_t *ei = se_memdup(pointer,sizeof(expert_info_t)); expert_tapdata_t * etd = tapdata; - - + + ei->protocol = se_strdup(ei->protocol); + ei->summary = se_strdup(ei->summary); + switch(ei->severity) { case(PI_CHAT): etd->chat_events++; |