inet: Cleanup router solicitation callback properly after error
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Wed, 12 Oct 2011 13:05:18 +0000 (16:05 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 20 Oct 2011 17:00:36 +0000 (19:00 +0200)
The cleanup routine must be called after an error and after
calling RS callback, otherwise the timeout is not removed
in right time.

src/inet.c

index d898650..56f29fd 100644 (file)
@@ -1487,6 +1487,7 @@ static int icmpv6_recv(int fd, gpointer user_data)
        len = recvmsg(fd, &mhdr, 0);
        if (len < 0) {
                data->callback(NULL, data->user_data);
+               rs_cleanup(data);
                return -errno;
        }