summaryrefslogtreecommitdiff
path: root/epan/packet.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-07-16 20:52:36 +0000
committerGerald Combs <gerald@wireshark.org>2009-07-16 20:52:36 +0000
commit753e9f65e5a39009248a86dce20fd71178560bd0 (patch)
tree96d3cb288f361735c67e83af2e7ffd5f14842ff6 /epan/packet.c
parent05babef3b45279712b217b7954337bd1863af6bc (diff)
downloadwireshark-753e9f65e5a39009248a86dce20fd71178560bd0.tar.gz
Zero out the packet_info struct for each packet instead of trying to
initialize everything by hand. Fixes a Valgrind warning. svn path=/trunk/; revision=29122
Diffstat (limited to 'epan/packet.c')
-rw-r--r--epan/packet.c48
1 files changed, 1 insertions, 47 deletions
diff --git a/epan/packet.c b/epan/packet.c
index 39eefb0b07..ceb3426c4c 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -263,70 +263,24 @@ dissect_packet(epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header,
{
if (cinfo != NULL)
col_init(cinfo);
+ memset(&edt->pi, 0, sizeof(edt->pi));
edt->pi.current_proto = "<Missing Protocol Name>";
edt->pi.cinfo = cinfo;
edt->pi.fd = fd;
edt->pi.pseudo_header = pseudo_header;
- edt->pi.data_src = NULL;
edt->pi.dl_src.type = AT_NONE;
- edt->pi.dl_src.len = 0;
- edt->pi.dl_src.data = NULL;
edt->pi.dl_dst.type = AT_NONE;
- edt->pi.dl_dst.len = 0;
- edt->pi.dl_dst.data = NULL;
edt->pi.net_src.type = AT_NONE;
- edt->pi.net_src.len = 0;
- edt->pi.net_src.data = NULL;
edt->pi.net_dst.type = AT_NONE;
- edt->pi.net_dst.len = 0;
- edt->pi.net_dst.data = NULL;
edt->pi.src.type = AT_NONE;
- edt->pi.src.len = 0;
- edt->pi.src.data = NULL;
edt->pi.dst.type = AT_NONE;
- edt->pi.dst.len = 0;
- edt->pi.dst.data = NULL;
- edt->pi.ethertype = 0;
- edt->pi.mpls_label = 0;
- edt->pi.ipproto = 0;
- edt->pi.ipxptype = 0;
edt->pi.ctype = CT_NONE;
- edt->pi.circuit_id = 0;
edt->pi.noreassembly_reason = "";
- edt->pi.fragmented = FALSE;
- edt->pi.in_error_pkt = FALSE;
edt->pi.ptype = PT_NONE;
- edt->pi.srcport = 0;
- edt->pi.destport = 0;
- edt->pi.match_port = 0;
- edt->pi.match_string = NULL;
- edt->pi.can_desegment = 0;
- edt->pi.want_pdu_tracking = 0;
edt->pi.p2p_dir = P2P_DIR_UNKNOWN;
- edt->pi.private_data = NULL;
- edt->pi.oxid = 0;
- edt->pi.rxid = 0;
- edt->pi.r_ctl = 0;
- edt->pi.src_idx = 0;
- edt->pi.dst_idx = 0;
- edt->pi.vsan = 0;
- edt->pi.dcectxid = 0;
edt->pi.dcetransporttype = -1;
- edt->pi.decrypt_gssapi_tvb = 0;
- edt->pi.gssapi_wrap_tvb = NULL;
- edt->pi.gssapi_encrypted_tvb = NULL;
- edt->pi.gssapi_decrypted_tvb = NULL;
- edt->pi.layer_names = NULL;
- edt->pi.link_number = 0;
edt->pi.annex_a_used = MTP2_ANNEX_A_USED_UNKNOWN;
- edt->pi.profinet_conv = NULL;
- edt->pi.profinet_type = 0;
- edt->pi.usb_conv_info = NULL;
- edt->pi.tcp_tree = NULL;
edt->pi.dcerpc_procedure_name="";
- edt->pi.sccp_info = NULL;
- edt->pi.clnp_srcref = 0;
- edt->pi.clnp_dstref = 0;
edt->pi.link_dir = LINK_DIR_UNKNOWN;
EP_CHECK_CANARY(("before dissecting frame %d",fd->num));