socket: Ensure variables are nullified correctly in UDP sockets
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Fri, 3 Jan 2014 15:02:33 +0000 (15:02 +0000)
committerOlivier CrĂȘte <olivier.crete@collabora.com>
Fri, 31 Jan 2014 06:48:59 +0000 (01:48 -0500)
commitbdc72e7898292a8fd32a53cd0e3de8996673daed
tree5cffbce57c212024a2fd784bc641d8b36be14f83
parent0655aab0f4dfa56d408e306d88deb4077c7518d7
socket: Ensure variables are nullified correctly in UDP sockets

When closing a socket, ensure its private data structure is set to NULL.
When sending a message fails to construct a new socket address, ensure
the pointer to the old address (which has just been unreffed) is removed.

This makes debugging problems with sockets being freed early much
easier.
socket/udp-bsd.c