aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-08-31 09:56:56 (GMT)
committerJouni Malinen <j@w1.fi>2015-08-31 14:25:20 (GMT)
commitccbd0518f65b7f034467b3fc26d6c3e0991ef78b (patch)
treec82db9f1862e0396c7c0163c72acb391b3cbc17c /src/wps
parentb8e20236c1b9847f66d453c229d34247be868b15 (diff)
downloadhostap-ccbd0518f65b7f034467b3fc26d6c3e0991ef78b.zip
hostap-ccbd0518f65b7f034467b3fc26d6c3e0991ef78b.tar.gz
hostap-ccbd0518f65b7f034467b3fc26d6c3e0991ef78b.tar.bz2
WPS: Clean up next_advertisement() error path
No need to have a common failure handler if it is used from only a single location and that lcoation does not even need the memory freeing step. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/wps')
-rw-r--r--src/wps/wps_upnp_ssdp.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/wps/wps_upnp_ssdp.c b/src/wps/wps_upnp_ssdp.c
index 26a740d..f04b47c 100644
--- a/src/wps/wps_upnp_ssdp.c
+++ b/src/wps/wps_upnp_ssdp.c
@@ -139,7 +139,7 @@ next_advertisement(struct upnp_wps_device_sm *sm,
uuid_bin2str(iface->wps->uuid, uuid_string, sizeof(uuid_string));
msg = wpabuf_alloc(800); /* more than big enough */
if (msg == NULL)
- goto fail;
+ return NULL;
switch (a->type) {
case ADVERTISE_UP:
case ADVERTISE_DOWN:
@@ -213,10 +213,6 @@ next_advertisement(struct upnp_wps_device_sm *sm,
*islast = 1;
return msg;
-
-fail:
- wpabuf_free(msg);
- return NULL;
}