summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2020-12-02 17:50:42 +0900
committerJaehyun Kim <jeik01.kim@samsung.com>2020-12-02 17:50:42 +0900
commit04d1dbacf6aabbb44f16f6776496192964d460d8 (patch)
tree23b1c9ee7c0154663ca5ce7886865a7761d3c991
parent33cdd54e34fcea201488aed301a31a204520b287 (diff)
downloadconnman-submit/tizen/20201217.131910.tar.gz
connman-submit/tizen/20201217.131910.tar.bz2
connman-submit/tizen/20201217.131910.zip
Return value of a function '__connman_service_get_network' is dereferenced without checking. Change-Id: Ib66474b2fc6924d50eb8b35206251938ba63baad Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
-rwxr-xr-xsrc/service.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/service.c b/src/service.c
index dd4f1919..a72a1691 100755
--- a/src/service.c
+++ b/src/service.c
@@ -8555,12 +8555,15 @@ static struct connman_device *default_connecting_device = NULL;
static void __connman_service_disconnect_default(struct connman_service *service)
{
struct connman_device *default_device = NULL;
+ struct connman_network *network = __connman_service_get_network(service);
+
+ if (!network)
+ return;
if (default_connecting_device == NULL)
return;
- default_device = connman_network_get_device(
- __connman_service_get_network(service));
+ default_device = connman_network_get_device(network);
DBG("Disconnecting service %p %s", service, service->path);
DBG("Disconnecting device %p %p %s",