Undo previous change to avoid crashing.
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 26 Jan 2010 14:55:26 +0000 (14:55 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 26 Jan 2010 14:55:26 +0000 (14:55 +0000)
The test for NULL was to see whether struct had ever been allocated,
not for detecting a failed allocation...

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31681 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-mac-lte.c

index ad3c8c730a4203138d2b85397eb66ba81d3c1be1..8f99c8d84a9c39ea040cd472d6a79e34ce9ebada 100644 (file)
@@ -1176,6 +1176,9 @@ static void call_rlc_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
 
     /* Resuse or create RLC info */
     p_rlc_lte_info = p_get_proto_data(pinfo->fd, proto_rlc_lte);
+    if (p_rlc_lte_info == NULL) {
+        p_rlc_lte_info = se_alloc0(sizeof(struct rlc_lte_info));
+    }
 
     /* Fill in struct details for srb channels */
     p_rlc_lte_info->rlcMode = mode;