aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-08-31 09:29:09 (GMT)
committerJouni Malinen <j@w1.fi>2015-08-31 14:25:20 (GMT)
commit92325e70909237808c06fd08382d8f8b7b451cd6 (patch)
tree9f049fcc6e4fef2b2da494c7bf5d57ee16b34c78 /src/wps
parent31e56b953c2d7aa8dc21913bec6a7c615dae7a80 (diff)
downloadhostap-92325e70909237808c06fd08382d8f8b7b451cd6.zip
hostap-92325e70909237808c06fd08382d8f8b7b451cd6.tar.gz
hostap-92325e70909237808c06fd08382d8f8b7b451cd6.tar.bz2
WPS: Merge SetSelectedRegistrar parsing error returns
There is no need to maintain two error paths for this. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/wps')
-rw-r--r--src/wps/wps_upnp_ap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wps/wps_upnp_ap.c b/src/wps/wps_upnp_ap.c
index 2949f14..cca3905 100644
--- a/src/wps/wps_upnp_ap.c
+++ b/src/wps/wps_upnp_ap.c
@@ -34,10 +34,8 @@ int upnp_er_set_selected_registrar(struct wps_registrar *reg,
wpa_hexdump_buf(MSG_MSGDUMP, "WPS: SetSelectedRegistrar attributes",
msg);
- if (wps_validate_upnp_set_selected_registrar(msg) < 0)
- return -1;
-
- if (wps_parse_msg(msg, &attr) < 0)
+ if (wps_validate_upnp_set_selected_registrar(msg) < 0 ||
+ wps_parse_msg(msg, &attr) < 0)
return -1;
s->reg = reg;