summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgsupplicant/supplicant.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index e9d6b9d..bb7dc14 100755
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -4934,6 +4934,11 @@ static void interface_add_network_params(DBusMessageIter *iter, void *user_data)
if (ssid->bssid) {
char *bssid = NULL;
bssid = g_try_malloc0(18);
+ if (bssid == NULL) {
+ SUPPLICANT_DBG("memory allocation error");
+ return;
+ }
+
snprintf(bssid, 18, "%02x:%02x:%02x:%02x:%02x:%02x",
ssid->bssid[0], ssid->bssid[1], ssid->bssid[2],
ssid->bssid[3], ssid->bssid[4], ssid->bssid[5]);