summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-07-14 09:44:24 +0200
committerMarcel Holtmann <marcel@holtmann.org>2009-07-14 09:44:24 +0200
commitdc49d7ec5b2954ae7e88ceceab6b94d804169b1b (patch)
treee2ee4e314dc3806e8771a48529f0d45f75bb0c2a /plugins
parent1e1540021772dbc0f1445fee2f43dd8739746b9e (diff)
downloadconnman-dc49d7ec5b2954ae7e88ceceab6b94d804169b1b.tar.gz
connman-dc49d7ec5b2954ae7e88ceceab6b94d804169b1b.tar.bz2
connman-dc49d7ec5b2954ae7e88ceceab6b94d804169b1b.zip
Fix potential invalid memory access of group name
Diffstat (limited to 'plugins')
-rw-r--r--plugins/supplicant.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/supplicant.c b/plugins/supplicant.c
index d9e3eb1c..8f7b7598 100644
--- a/plugins/supplicant.c
+++ b/plugins/supplicant.c
@@ -1555,7 +1555,7 @@ static void state_change(struct supplicant_task *task, DBusMessage *msg)
case WPA_COMPLETED:
if (connman_network_get_group(task->network) == NULL) {
const char *name, *mode, *security;
- char *group, *bssid;
+ char *bssid;
/*
* This is a hidden network, we need to set its
@@ -1571,13 +1571,15 @@ static void state_change(struct supplicant_task *task, DBusMessage *msg)
"WiFi.Security");
if (bssid && name && mode && security) {
+ char *group;
+
group = build_group(bssid, name, NULL, 0,
mode, security);
connman_network_set_group(task->network, group);
+ g_free(group);
}
g_free(bssid);
- g_free(group);
}
/* carrier on */