From: Jaehyun Kim Date: Tue, 1 Sep 2020 05:20:41 +0000 (+0900) Subject: Fix derefrencing of NULL pointer X-Git-Tag: accepted/tizen/unified/20200903.151723^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fconnman.git;a=commitdiff_plain;h=d83e22d76d02f26b23e8e59ced7862d77bb4f667 Fix derefrencing of NULL pointer In some cases wifi->network is NULL which leads to crash Change-Id: Ie02bb6a84f25d816935b492169feed2aca7f76b8 Signed-off-by: Jaehyun Kim --- diff --git a/plugins/wifi.c b/plugins/wifi.c index 8fe2be3..a1da419 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; }