summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/wpa_supplicant/wpa_ctrl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/wpa_supplicant/wpa_ctrl.c b/contrib/wpa_supplicant/wpa_ctrl.c
index 8e35116..3c79fc4 100644
--- a/contrib/wpa_supplicant/wpa_ctrl.c
+++ b/contrib/wpa_supplicant/wpa_ctrl.c
@@ -93,8 +93,7 @@ struct wpa_ctrl * wpa_ctrl_open(const char *ctrl_path)
snprintf(ctrl->local.sun_path, sizeof(ctrl->local.sun_path) - 1,
"/tmp/wpa_ctrl_%d-%d", getpid(), counter++);
if (bind(ctrl->s, (struct sockaddr *) &ctrl->local,
- sizeof(ctrl->local.sun_family) +
- strlen(ctrl->local.sun_path)) < 0) {
+ sizeof(ctrl->local)) < 0) {
close(ctrl->s);
free(ctrl);
return NULL;
OpenPOWER on IntegriCloud