Resuse struct for PDCP info when redissecting.
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 17 Nov 2009 17:30:40 +0000 (17:30 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 17 Nov 2009 17:30:40 +0000 (17:30 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30992 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-rlc-lte.c

index 82f9b7478151094588e810f4e648e789cdf4481e..ebf8bad813fe3001923e68db10f264e8c625cd11 100644 (file)
@@ -354,8 +354,11 @@ static void show_AM_PDU_in_tree(packet_info *pinfo, proto_tree *tree, tvbuff_t *
 
             struct pdcp_lte_info *p_pdcp_lte_info;
 
-            /* Allocate & zero struct */
-            p_pdcp_lte_info = se_alloc0(sizeof(struct pdcp_lte_info));
+            /* Reuse or allocate struct */
+            p_pdcp_lte_info = p_get_proto_data(pinfo->fd, proto_pdcp_lte);
+            if (p_pdcp_lte_info == NULL) {
+                p_pdcp_lte_info = se_alloc0(sizeof(struct pdcp_lte_info));
+            }
             if (p_pdcp_lte_info == NULL) {
                 return;
             }