diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-10-02 04:55:51 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-10-02 04:55:51 +0000 |
commit | e5dc139092b7610d372fc0ebb15433cb40cd991b (patch) | |
tree | 0ef7502d74ee8e11bc409251a3eb122e71a8b52e /epan/dissectors/packet-btrfcomm.c | |
parent | 3e1faa7562ee185c8a733b75672ed7509bbaccf7 (diff) |
Make sure any data structures we allocate are properly initialized. Fixes
bug 2922.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26333 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-btrfcomm.c')
-rw-r--r-- | epan/dissectors/packet-btrfcomm.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/epan/dissectors/packet-btrfcomm.c b/epan/dissectors/packet-btrfcomm.c index cba55de7e6..5291476b54 100644 --- a/epan/dissectors/packet-btrfcomm.c +++ b/epan/dissectors/packet-btrfcomm.c @@ -284,14 +284,9 @@ dissect_ctrl_pn(packet_info *pinfo, proto_tree *t, tvbuff_t *tvb, int offset, in if(!pinfo->fd->flags.visited){ dlci_state=se_tree_lookup32(dlci_table, dlci); if(!dlci_state){ - dlci_state=se_alloc(sizeof(dlci_state_t)); - dlci_state->do_credit_fc=0; - dlci_state->direction[0].len=0; + dlci_state=se_alloc0(sizeof(dlci_state_t)); dlci_state->direction[0].current=-1; - dlci_state->direction[0].stream_buf=NULL; - dlci_state->direction[1].len=0; dlci_state->direction[1].current=-1; - dlci_state->direction[1].stream_buf=NULL; se_tree_insert32(dlci_table, dlci, dlci_state); } @@ -642,14 +637,9 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dlci_state=se_tree_lookup32(dlci_table, dlci); if(!dlci_state){ - dlci_state=se_alloc(sizeof(dlci_state_t)); - dlci_state->do_credit_fc=0; - dlci_state->direction[0].len=0; + dlci_state=se_alloc0(sizeof(dlci_state_t)); dlci_state->direction[0].current=-1; - dlci_state->direction[0].stream_buf=NULL; - dlci_state->direction[1].len=0; dlci_state->direction[1].current=-1; - dlci_state->direction[1].stream_buf=NULL; se_tree_insert32(dlci_table, dlci, dlci_state); } |