checked the NULL before dereference
Change-Id: Ic5ea6e726b700ede91b1306d8d93f3a2ef4e4fd3
Signed-off-by: Prasadam Prashath Kumar <prasadam.p@samsung.com>
sta_timer_list = g_slist_append(sta_timer_list, ptr);
band_update_info_t *info = NULL;
info = (band_update_info_t *)g_malloc(sizeof(band_update_info_t));
+ if (info == NULL) {
+ ERR("g_malloc failed\n");
+ g_free(mac);
+ mac = NULL;
+ return TRUE;
+ }
info->mac_addr = g_strdup(mac);
info->band = (hostapd_monitor_fd[HOSTAPD_WIFI_BAND_2G] == *data_fd) ? HOSTAPD_WIFI_BAND_2G : HOSTAPD_WIFI_BAND_5G;
_add_mac_band_info(info);