[PATCH 1/1] hostapd_cli: fix seg fault for interface command
Eduardo Abinader
eduardo.abinader
Thu May 29 14:42:07 PDT 2014
ctrl_ifname was not being freed and allocated
by proper functions: os_free and os_strdup.
Signed-off-by: Eduardo Abinader <eduardo.abinader at openbossa.org>
---
hostapd/hostapd_cli.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index c488b4f..1c4a84c 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -842,8 +842,8 @@ static int hostapd_cli_cmd_interface(struct wpa_ctrl *ctrl, int argc,
}
hostapd_cli_close_connection();
- free(ctrl_ifname);
- ctrl_ifname = strdup(argv[0]);
+ os_free(ctrl_ifname);
+ ctrl_ifname = os_strdup(argv[0]);
if (hostapd_cli_open_connection(ctrl_ifname)) {
printf("Connected to interface '%s.\n", ctrl_ifname);
--
1.9.1
More information about the Hostap
mailing list