From 25160aada7784cf402230d9cb67f441802bb9c63 Mon Sep 17 00:00:00 2001 From: Nishant Chaprana Date: Wed, 30 Sep 2020 15:40:18 +0530 Subject: [PATCH] [Fix][plugin/ethernet] SVACE warning DEREF_AFTER_NULL Change-Id: Ie3a9044de3be7ce46d05052920f9d5b5d99cd15f Signed-off-by: Nishant Chaprana --- packaging/connman.spec | 2 +- plugins/ethernet.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packaging/connman.spec b/packaging/connman.spec index a8904e2..0957d3d 100644 --- a/packaging/connman.spec +++ b/packaging/connman.spec @@ -5,7 +5,7 @@ Name: connman Version: 1.37 -Release: 44 +Release: 45 License: GPL-2.0+ Summary: Connection Manager Url: http://connman.net diff --git a/plugins/ethernet.c b/plugins/ethernet.c index 57d6542..2a91e2f 100644 --- a/plugins/ethernet.c +++ b/plugins/ethernet.c @@ -437,7 +437,10 @@ static void eth_dev_remove(struct connman_device *device) connman_device_set_data(device, NULL); #if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET - if (ethernet && ethernet->interface) { + if (!ethernet) + return; + + if (ethernet->interface) { g_supplicant_interface_remove(ethernet->interface, NULL, NULL); ethernet->interface = NULL; } -- 2.7.4