From: Daniel Wagner <[email protected]>
We check if service is valid but still we are going to
access it in the error path. Instead doing this we just
can return here directly.
Reported by coverity.
---
src/network.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/network.c b/src/network.c
index caa35a0..bd5796e 100644
--- a/src/network.c
+++ b/src/network.c
@@ -1456,10 +1456,8 @@ int connman_network_connect_hidden(struct
connman_network *network,
DBG("network %p service %p user_data %p", network, service, user_data);
- if (!service) {
- err = -EINVAL;
- goto out;
- }
+ if (!service)
+ return -EINVAL;
if (identity)
__connman_service_set_agent_identity(service, identity);
--
1.8.4.474.g128a96c
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman