aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-04-05 10:07:49 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-04-05 10:07:49 +0000
commit5e89308fe3c5cc87533e32b97c856ffdd1525796 (patch)
tree6ffc2fbc2958155172ba2d508e436fc12306a5f1 /epan/dissectors
parent4a8bcee67f6c00b0848f9a58a9dba13fa6387a99 (diff)
from previous commit
dont dereference cdata null pointer svn path=/trunk/; revision=17814
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-fcp.c10
1 files changed, 5 insertions, 5 deletions
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 {