From: Daniel Wagner <[email protected]>
The socket is not closed when we hit the error path.
Found by coverty.
---
src/inet.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/inet.c b/src/inet.c
index 90ec5f7..8f204b7 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -1457,8 +1457,10 @@ static int ndisc_send_unspec(int type, int oif, const
struct in6_addr *dest,
} else if (type == ND_NEIGHBOR_SOLICIT) {
datalen = sizeof(frame.i.ns); /* 24, csum() safe */
memcpy(&frame.i.ns.nd_ns_target, buf, sizeof(struct in6_addr));
- } else
+ } else {
+ close(fd);
return -EINVAL;
+ }
dst.sin6_addr = *dest;
--
1.8.4.474.g128a96c
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman