Make sure some variables are initialized so that Valgrind quits
complaining. Use se_memdup to copy memory. svn path=/trunk/; revision=29123
This commit is contained in:
parent
753e9f65e5
commit
fcac7c5695
|
@ -5447,8 +5447,7 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
message_type = tvb_get_guint8(tvb, 1);
|
||||
msg_length = tvb_get_ntohs(tvb, 6);
|
||||
|
||||
rsvph = ep_alloc(sizeof(rsvp_conversation_info));
|
||||
rsvph->session_type = 0;
|
||||
rsvph = ep_alloc0(sizeof(rsvp_conversation_info));
|
||||
|
||||
/* Copy over the source and destination addresses from the pinfo strucutre */
|
||||
SET_ADDRESS(&rsvph->source, pinfo->src.type, pinfo->src.len, pinfo->src.data);
|
||||
|
@ -5499,6 +5498,7 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
/* Now build the request key */
|
||||
memset(&request_key, 0, sizeof(request_key));
|
||||
request_key.conversation = conversation->index;
|
||||
request_key.session_type = rsvph->session_type;
|
||||
|
||||
|
@ -5564,8 +5564,7 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
/* If not, insert the new request key into the hash table */
|
||||
if (!request_val) {
|
||||
new_request_key = se_alloc(sizeof(struct rsvp_request_key));
|
||||
*new_request_key = request_key;
|
||||
new_request_key = se_memdup(&request_key, sizeof(struct rsvp_request_key));
|
||||
|
||||
request_val = se_alloc(sizeof(struct rsvp_request_val));
|
||||
request_val->value = conversation->index;
|
||||
|
|
Loading…
Reference in New Issue