From acf0f2cdb4cc67f699a071fb1a6910f1637a2902 Mon Sep 17 00:00:00 2001 From: Kovarththanan Rajaratnam Date: Sun, 20 Sep 2009 08:24:35 +0000 Subject: [PATCH] Use ep_alloc() instead of g_malloc() for packet scoped allocations svn path=/trunk/; revision=29998 --- epan/dissectors/packet-rtps2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epan/dissectors/packet-rtps2.c b/epan/dissectors/packet-rtps2.c index 70c3248758..7d451d7122 100644 --- a/epan/dissectors/packet-rtps2.c +++ b/epan/dissectors/packet-rtps2.c @@ -1404,7 +1404,7 @@ static void rtps_util_add_guid_prefix(proto_tree *tree, } /* Format the string */ - temp_buff = (guint8 *)g_malloc(MAX_GUID_PREFIX_SIZE); + temp_buff = (guint8 *) ep_alloc(MAX_GUID_PREFIX_SIZE); g_snprintf(temp_buff, MAX_GUID_PREFIX_SIZE, "%s=%02x%02x%02x%02x:%02x%02x%02x%02x:%02x%02x%02x%02x" " { hostId=%08x, appId=%08x, counter=%08x }", @@ -1476,7 +1476,6 @@ static void rtps_util_add_guid_prefix(proto_tree *tree, if (buffer != NULL) { g_strlcpy(buffer, temp_buff, buffer_size); } - g_free(temp_buff); }