udpsrc: fix valgrind warning

https://bugzilla.gnome.org/show_bug.cgi?id=666644
This commit is contained in:
Tim-Philipp Müller 2011-12-27 11:50:03 +00:00
parent b744ad03cc
commit 86cd5bd7f2

View file

@ -491,7 +491,8 @@ retry:
if (G_UNLIKELY (!readsize)) {
/* try to read a packet (and it will be ignored),
* in case a packet with no data arrived */
recvfrom (udpsrc->sock.fd, (char *)&slen, 0, 0, &sa.sa, &slen);
slen = sizeof (sa);
recvfrom (udpsrc->sock.fd, (char *) &slen, 0, 0, &sa.sa, &slen);
/* clear any error, in case a poll error occurred */
clear_error (udpsrc);