ememify sip and at the same plug a memleak

every single time the sip dissector was called   a 32byte or larger blob was g_malloced and never freed.
this not only leaks 32+ bytes + g_malloc bookkeeping overhead  but also fragments memory so the real leak of memory is likely much bigger.


fix  bad memleak


svn path=/trunk/; revision=15354
This commit is contained in:
Ronnie Sahlberg 2005-08-14 06:00:20 +00:00
parent f6d36d20d0
commit 9e7dbe202b
1 changed files with 2 additions and 1 deletions

View File

@ -59,6 +59,7 @@
#include "packet-sip.h"
#include <epan/tap.h>
#include <epan/emem.h>
#define TCP_PORT_SIP 5060
#define UDP_PORT_SIP 5060
@ -992,7 +993,7 @@ dissect_sip_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int strlen_to_copy;
/* Initialise stat info for passing to tap */
stat_info = g_malloc(sizeof(sip_info_value_t));
stat_info = ep_alloc(sizeof(sip_info_value_t));
stat_info->response_code = 0;
stat_info->request_method = NULL;
stat_info->reason_phrase = NULL;