From 6288aa7ff2275b180acf3c4a3cb1f58dbc7194f1 Mon Sep 17 00:00:00 2001 From: sahlberg Date: Wed, 5 Apr 2006 10:07:49 +0000 Subject: from previous commit dont dereference cdata null pointer git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17814 f5534014-38df-0310-8fa8-9805f1628bb7 --- epan/dissectors/packet-fcp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'epan/dissectors') diff --git a/epan/dissectors/packet-fcp.c b/epan/dissectors/packet-fcp.c index 48dfabb79a..1840989790 100644 --- a/epan/dissectors/packet-fcp.c +++ b/epan/dissectors/packet-fcp.c @@ -583,11 +583,11 @@ dissect_fcp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, pro pinfo->private_data = NULL; } - if (cdata->fcp_lun >= 0) - proto_tree_add_uint_hidden(tree, hf_fcp_singlelun, tvb, - 0, 0, cdata->fcp_lun); - if (cdata) { + if (cdata->fcp_lun >= 0) + proto_tree_add_uint_hidden(tree, hf_fcp_singlelun, tvb, + 0, 0, cdata->fcp_lun); + dissect_scsi_payload(tvb, pinfo, parent_tree, FALSE, (guint16) cdata->fcp_lun); } else { dissect_scsi_payload(tvb, pinfo, parent_tree, FALSE, 0xffff); @@ -750,7 +750,7 @@ dissect_fcp_xfer_rdy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, cdata = (fcp_conv_data_t *)g_hash_table_lookup (fcp_req_hash, &ckey); - if (cdata != NULL) { + if (cdata) { cdata->fcp_dl = tvb_get_ntohl (tvb, offset+4); } else { -- cgit v1.2.3