From 8ce617244c1c27647823cdd76946badc2e466e66 Mon Sep 17 00:00:00 2001 From: Niraj Kumar Goit Date: Tue, 15 Dec 2020 15:29:06 +0530 Subject: [PATCH] Fixed dereferencing of the NULL pointer. Change-Id: Ibd23d2ea1c5c1028a7f42fe68199a7a2f914c939 Signed-off-by: Niraj Kumar Goit --- packaging/net-config.spec | 2 +- src/wifi-config.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packaging/net-config.spec b/packaging/net-config.spec index efd0302..c179d9d 100755 --- a/packaging/net-config.spec +++ b/packaging/net-config.spec @@ -1,6 +1,6 @@ Name: net-config Summary: TIZEN Network Configuration service -Version: 1.2.6 +Version: 1.2.7 Release: 3 Group: System/Network License: Apache-2.0 diff --git a/src/wifi-config.c b/src/wifi-config.c index f889209..5911505 100755 --- a/src/wifi-config.c +++ b/src/wifi-config.c @@ -1050,6 +1050,12 @@ gboolean handle_get_config_ids(Wifi *wifi, GDBusMethodInvocation *context, g_return_val_if_fail(wifi != NULL, TRUE); mac_addr = wifi_state_get_mac_address(ifname); + if (!mac_addr) { + ERR("Fail to get mac-address"); + netconfig_error_no_profile(context); + return TRUE; + } + DBG("%s", mac_addr); config_ids = _get_list(mac_addr); if (config_ids == NULL) { -- 2.34.1