aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2012-10-23 21:00:34 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2012-10-23 21:00:34 +0000
commitf05cc88f6fab351a7b88a02aeae9d074f04f9b73 (patch)
tree450db3dd0c46f242bc54822dd6c2a6a47511559e
parentc9b7d8c3c233b1108c8549f970ebd11a91a45608 (diff)
Don't bother to check if cdata is NULL; it has already been dereferenced.
Fixes Coverity CID 719420: Dereference before null check. svn path=/trunk/; revision=45741
-rw-r--r--epan/dissectors/packet-scsi-mmc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/epan/dissectors/packet-scsi-mmc.c b/epan/dissectors/packet-scsi-mmc.c
index daff10fb3a..adff99a108 100644
--- a/epan/dissectors/packet-scsi-mmc.c
+++ b/epan/dissectors/packet-scsi-mmc.c
@@ -585,9 +585,7 @@ dissect_mmc4_readtocpmaatip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
}
proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset + 6, 2, ENC_BIG_ENDIAN);
- if (cdata) {
- cdata->itlq->alloc_len = tvb_get_ntohs(tvb, offset + 6);
- }
+ cdata->itlq->alloc_len = tvb_get_ntohs(tvb, offset + 6);
proto_tree_add_bitmask(tree, tvb, offset+8, hf_scsi_control,
ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);