external/wpa_supplicant_6
Revisão | 4d13ed6d3f252ef7a3ae2fd18000fb765b5c2fa1 (tree) |
---|---|
Hora | 2011-03-05 04:00:13 |
Autor | Dmitry Shmidt <dimitrysh@goog...> |
Commiter | Dmitry Shmidt |
Check select() return value in wpa_ctrl_request()
Change-Id: I7bd8bbae8a5d74ef576de3e3b3f08473fc9b6d0b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
@@ -332,6 +332,8 @@ int wpa_ctrl_request(struct wpa_ctrl *ctrl, const char *cmd, size_t cmd_len, | ||
332 | 332 | FD_ZERO(&rfds); |
333 | 333 | FD_SET(ctrl->s, &rfds); |
334 | 334 | res = select(ctrl->s + 1, &rfds, NULL, NULL, &tv); |
335 | + if (res < 0) | |
336 | + return res; | |
335 | 337 | if (FD_ISSET(ctrl->s, &rfds)) { |
336 | 338 | res = recv(ctrl->s, reply, *reply_len, 0); |
337 | 339 | if (res < 0) |