diff options
author | Evan Huus <eapache@gmail.com> | 2014-10-15 08:22:09 -0400 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-10-15 12:24:04 +0000 |
commit | 5cdb032304046e114e43b37fb633787b45d2bd89 (patch) | |
tree | f4e63ca20290afa4b66334a2e5d1dce36d49d3b8 /epan | |
parent | 38ffca5fef7837cda50ab278ac0f5f925173f6b2 (diff) |
smb2: fully initialize dummy session
A few fields weren't being zeroed and were causing valgrind warnings.
Bug: 10569
Change-Id: I30e1e70c9445376806f385f3578b65bf6e320f8b
Reviewed-on: https://code.wireshark.org/review/4702
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-smb2.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c index 709734cf21..ebb16d60c9 100644 --- a/epan/dissectors/packet-smb2.c +++ b/epan/dissectors/packet-smb2.c @@ -6853,13 +6853,10 @@ dissect_smb2_tid_sesid(packet_info *pinfo _U_, proto_tree *tree, tvbuff_t *tvb, * a tree connect, we create a dummy sessison, so we can hang the * tree data on it */ - si->session = wmem_new(wmem_file_scope(), smb2_sesid_info_t); - si->session->sesid = si->sesid; - si->session->acct_name = NULL; - si->session->domain_name = NULL; - si->session->host_name = NULL; - si->session->auth_frame = (guint32)-1; - si->session->tids = g_hash_table_new(smb2_tid_info_hash, smb2_tid_info_equal); + si->session = wmem_new0(wmem_file_scope(), smb2_sesid_info_t); + si->session->sesid = si->sesid; + si->session->auth_frame = (guint32)-1; + si->session->tids = g_hash_table_new(smb2_tid_info_hash, smb2_tid_info_equal); g_hash_table_insert(si->conv->sesids, si->session, si->session); return offset; |