← Back to team overview

rohc team mailing list archive

[Question #118413]: a code question

 

New question #118413 on rohc:
https://answers.launchpad.net/rohc/+question/118413

When I using the ROHC code,I find a segment of code canot understanding:

struct ip6_hdr * ipv6_get_header(struct ip_packet ip)
{
	struct ip6_hdr *header;
	if(ip.version == IPV6)
		header = &ip.header.v6;
	else
		header = NULL;

	return header;
}

I think when the function end,the "ip" which used in this function(it's not the "ip" of parameter ) will be free,so the point "header" will be a wild pointer.

-- 
You received this question notification because you are a member of ROHC
Team, which is an answer contact for rohc.