From ef20094c7e33417a6ca4b94b95fd1aae3567482e Mon Sep 17 00:00:00 2001 From: Nishant Chaprana Date: Wed, 26 Oct 2016 17:09:18 +0530 Subject: [PATCH] Removed redundant NULL check for service in ws_start_service_discovery() Change-Id: I346f0f79e06130eec25723cf9b415cde784cce8e Signed-off-by: Nishant Chaprana --- packaging/wifi-direct-manager.spec | 2 +- plugin/wpasupplicant/ctrl_iface_sock/wfd-plugin-wpasupplicant.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/packaging/wifi-direct-manager.spec b/packaging/wifi-direct-manager.spec index c7c502b..a0dadf8 100644 --- a/packaging/wifi-direct-manager.spec +++ b/packaging/wifi-direct-manager.spec @@ -2,7 +2,7 @@ Name: wifi-direct-manager Summary: Wi-Fi Direct manger -Version: 1.2.211 +Version: 1.2.212 Release: 1 Group: Network & Connectivity/Wireless License: Apache-2.0 diff --git a/plugin/wpasupplicant/ctrl_iface_sock/wfd-plugin-wpasupplicant.c b/plugin/wpasupplicant/ctrl_iface_sock/wfd-plugin-wpasupplicant.c index 0d6f46e..15abde4 100644 --- a/plugin/wpasupplicant/ctrl_iface_sock/wfd-plugin-wpasupplicant.c +++ b/plugin/wpasupplicant/ctrl_iface_sock/wfd-plugin-wpasupplicant.c @@ -4323,10 +4323,6 @@ int ws_start_service_discovery(unsigned char *mac_addr, int service_type) WDP_LOGE("Failed to allocate memory for service"); return -1; } - if (!service) { - WDP_LOGE("Failed to allocate memory for service"); - return -1; - } if (mac_addr[0] == 0 && mac_addr[1] == 0 && mac_addr[2] == 0 && mac_addr[3] == 0 && mac_addr[4] == 0 && mac_addr[5] == 0) { -- 2.7.4