summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-08-31 12:29:09 +0300
committerJouni Malinen <j@w1.fi>2015-08-31 17:25:20 +0300
commit92325e70909237808c06fd08382d8f8b7b451cd6 (patch)
tree9f049fcc6e4fef2b2da494c7bf5d57ee16b34c78 /src
parent31e56b953c2d7aa8dc21913bec6a7c615dae7a80 (diff)
downloadhostap-92325e70909237808c06fd08382d8f8b7b451cd6.tar.gz
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')
-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 2949f1412..cca390530 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;