udp_recv: Fix a memory leak in case mcast_receiver_setup() failed.
authorAndre Noll <maan@systemlinux.org>
Sun, 21 Mar 2010 12:06:32 +0000 (13:06 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 21 Mar 2010 12:06:32 +0000 (13:06 +0100)
We have to free the private_data structure.

udp_recv.c

index c768d32..8dc8edc 100644 (file)
@@ -209,7 +209,7 @@ static int udp_recv_open(struct receiver_node *rn)
        ret = mcast_receiver_setup(purd->fd, iface);
        if (ret < 0) {
                close(purd->fd);
-               return ret;
+               goto err;
        }
 
        ret = mark_fd_nonblocking(purd->fd);