aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/wpa_ctrl.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2011-03-15 13:54:21 (GMT)
committerJouni Malinen <j@w1.fi>2011-03-15 13:54:21 (GMT)
commitc6a3a11048097fcec9925b3da528eab9eb272c18 (patch)
tree9497558d15a120279f00a04f8a229413adfa54c4 /src/common/wpa_ctrl.c
parent8e8f849f9d63a0f7cbe01dd6348419b6ff453673 (diff)
downloadhostap-c6a3a11048097fcec9925b3da528eab9eb272c18.zip
hostap-c6a3a11048097fcec9925b3da528eab9eb272c18.tar.gz
hostap-c6a3a11048097fcec9925b3da528eab9eb272c18.tar.bz2
Check select() return value in wpa_ctrl_request()
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'src/common/wpa_ctrl.c')
-rw-r--r--src/common/wpa_ctrl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/wpa_ctrl.c b/src/common/wpa_ctrl.c
index 546699b..88d3a02 100644
--- a/src/common/wpa_ctrl.c
+++ b/src/common/wpa_ctrl.c
@@ -282,6 +282,8 @@ int wpa_ctrl_request(struct wpa_ctrl *ctrl, const char *cmd, size_t cmd_len,
FD_ZERO(&rfds);
FD_SET(ctrl->s, &rfds);
res = select(ctrl->s + 1, &rfds, NULL, NULL, &tv);
+ if (res < 0)
+ return res;
if (FD_ISSET(ctrl->s, &rfds)) {
res = recv(ctrl->s, reply, *reply_len, 0);
if (res < 0)