aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/h245
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2012-08-19 00:21:26 +0000
committerMichael Mann <mmann78@netscape.net>2012-08-19 00:21:26 +0000
commit6c0e747f61942d603781df4a27f730c1805c2709 (patch)
tree79ee73598bd3608207d0ccf67ece0c35161bdf8a /asn1/h245
parent4546cfeab5ee8470aef21b2f47db92d62cc3b9cb (diff)
use session allocated memory for rtp_add_address/srtp_add_address hash tables
svn path=/trunk/; revision=44571
Diffstat (limited to 'asn1/h245')
-rw-r--r--asn1/h245/packet-h245-template.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/asn1/h245/packet-h245-template.c b/asn1/h245/packet-h245-template.c
index 26a17107db..6888e5a16d 100644
--- a/asn1/h245/packet-h245-template.c
+++ b/asn1/h245/packet-h245-template.c
@@ -336,15 +336,6 @@ static void update_unicast_addr(unicast_addr_t *req_addr, unicast_addr_t *ack_ad
}
}
-static void free_encoding_name_str (void *ptr)
-{
- encoding_name_and_rate_t *encoding_name_and_rate = (encoding_name_and_rate_t *)ptr;
-
- if (encoding_name_and_rate->encoding_name) {
- g_free(encoding_name_and_rate->encoding_name);
- }
-}
-
static void h245_setup_channels(packet_info *pinfo, channel_info_t *upcoming_channel_lcl)
{
gint *key;
@@ -365,11 +356,11 @@ static void h245_setup_channels(packet_info *pinfo, channel_info_t *upcoming_cha
/* (S)RTP, (S)RTCP */
if (upcoming_channel_lcl->rfc2198 > 0) {
- encoding_name_and_rate_t *encoding_name_and_rate = g_malloc( sizeof(encoding_name_and_rate_t));
- rtp_dyn_payload = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, free_encoding_name_str);
- encoding_name_and_rate->encoding_name = g_strdup("red");
+ encoding_name_and_rate_t *encoding_name_and_rate = se_alloc( sizeof(encoding_name_and_rate_t));
+ rtp_dyn_payload = g_hash_table_new(g_int_hash, g_int_equal);
+ encoding_name_and_rate->encoding_name = se_strdup("red");
encoding_name_and_rate->sample_rate = 8000;
- key = g_malloc(sizeof(gint));
+ key = se_alloc(sizeof(gint));
*key = upcoming_channel_lcl->rfc2198;
g_hash_table_insert(rtp_dyn_payload, key, encoding_name_and_rate);
}