summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2020-09-01 14:20:41 +0900
committerJaehyun Kim <jeik01.kim@samsung.com>2020-09-01 14:20:41 +0900
commitd83e22d76d02f26b23e8e59ced7862d77bb4f667 (patch)
treeb2c14494d6326e7f27361ce10a8f989b598fe818
parentd580f4026c54cb070f6e2dabf03ed557c14e10e0 (diff)
downloadconnman-d83e22d76d02f26b23e8e59ced7862d77bb4f667.tar.gz
connman-d83e22d76d02f26b23e8e59ced7862d77bb4f667.tar.bz2
connman-d83e22d76d02f26b23e8e59ced7862d77bb4f667.zip
In some cases wifi->network is NULL which leads to crash Change-Id: Ie02bb6a84f25d816935b492169feed2aca7f76b8 Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
-rwxr-xr-xplugins/wifi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 8fe2be3b..a1da4194 100755
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -3905,7 +3905,9 @@ static gboolean autosignalpoll_timeout(gpointer data)
if (ret < 0) {
DBG("Fail to get max speed !!");
wifi->automaxspeed_timeout = 0;
- connman_network_unref(wifi->network);
+
+ if (wifi->network)
+ connman_network_unref(wifi->network);
return FALSE;
}