MySQL: Fixup connection data initialization.

Just use wmem_new0 instead of trying to initialize struct members
by hand. Closes #16854.
This commit is contained in:
Gerald Combs 2020-09-21 21:52:35 +00:00 committed by Wireshark GitLab Utility
parent 2b3e666a16
commit 1e2e32f8ab
1 changed files with 2 additions and 14 deletions

View File

@ -2834,20 +2834,8 @@ dissect_mysql_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
/* get associated state information, create if necessary */
conn_data= (mysql_conn_data_t *)conversation_get_proto_data(conversation, proto_mysql);
if (!conn_data) {
conn_data= wmem_new(wmem_file_scope(), mysql_conn_data_t);
conn_data->srv_caps= 0;
conn_data->clnt_caps= 0;
conn_data->clnt_caps_ext= 0;
conn_data->state= UNDEFINED;
conn_data->stmts= wmem_tree_new(wmem_file_scope());
#ifdef CTDEBUG
conn_data->generation= 0;
#endif
conn_data->major_version= 0;
conn_data->frame_start_ssl= 0;
conn_data->frame_start_compressed= 0;
conn_data->compressed_state= MYSQL_COMPRESS_NONE;
conn_data->is_mariadb_client = 0;
conn_data = wmem_new0(wmem_file_scope(), mysql_conn_data_t);
conn_data->stmts = wmem_tree_new(wmem_file_scope());
conversation_add_proto_data(conversation, proto_mysql, conn_data);
}