diff options
author | darkjames <darkjames@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-05-05 06:55:12 +0000 |
---|---|---|
committer | darkjames <darkjames@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-05-05 06:55:12 +0000 |
commit | 3d1497b34911adbd306d0df6ce0d9cec6538ab5d (patch) | |
tree | 03052cc89748ca16305dcf5daf69a61c4582e65a /epan/dissectors/packet-pdcp-lte.c | |
parent | 5e9f65a289024336b847f5f19ee7afa4f0bbca86 (diff) |
Cleanup: replace se_alloc+memcpy combo with single se_memdup().
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36996 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-pdcp-lte.c')
-rw-r--r-- | epan/dissectors/packet-pdcp-lte.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c index 0a8920b99a..f84d08d086 100644 --- a/epan/dissectors/packet-pdcp-lte.c +++ b/epan/dissectors/packet-pdcp-lte.c @@ -528,12 +528,9 @@ static void checkChannelSequenceInfo(packet_info *pinfo, tvbuff_t *tvb, if (p_channel_status == NULL) { createdChannel = TRUE; - /* Allocate a new key and value */ - p_channel_key = se_alloc(sizeof(pdcp_channel_hash_key)); + /* Allocate a new value and duplicate key contents */ p_channel_status = se_alloc0(sizeof(pdcp_channel_status)); - - /* Copy key contents */ - memcpy(p_channel_key, &channel_key, sizeof(pdcp_channel_hash_key)); + p_channel_key = se_memdup(&channel_key, sizeof(pdcp_channel_hash_key)); /* Add entry */ g_hash_table_insert(pdcp_sequence_analysis_channel_hash, p_channel_key, p_channel_status); |