projects
/
libeap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
acd0ef4
)
WPS: Remove unused error path code
author
Jouni Malinen
<j@w1.fi>
Sun, 17 Oct 2010 17:10:09 +0000
(20:10 +0300)
committer
Jouni Malinen
<j@w1.fi>
Sun, 17 Oct 2010 17:10:09 +0000
(20:10 +0300)
src/wps/wps_upnp.c
patch
|
blob
|
history
diff --git
a/src/wps/wps_upnp.c
b/src/wps/wps_upnp.c
index
d2e4731
..
29806ec
100644
(file)
--- a/
src/wps/wps_upnp.c
+++ b/
src/wps/wps_upnp.c
@@
-307,7
+307,6
@@
static void subscr_addr_add_url(struct subscription *s, const char *url)
struct addrinfo *result = NULL;
struct addrinfo *rp;
int rerr;
struct addrinfo *result = NULL;
struct addrinfo *rp;
int rerr;
- struct subscr_addr *a = NULL;
/* url MUST begin with http: */
if (os_strncasecmp(url, "http://", 7))
/* url MUST begin with http: */
if (os_strncasecmp(url, "http://", 7))
@@
-367,6
+366,8
@@
static void subscr_addr_add_url(struct subscription *s, const char *url)
goto fail;
}
for (rp = result; rp; rp = rp->ai_next) {
goto fail;
}
for (rp = result; rp; rp = rp->ai_next) {
+ struct subscr_addr *a;
+
/* Limit no. of address to avoid denial of service attack */
if (dl_list_len(&s->addr_list) >= MAX_ADDR_PER_SUBSCRIPTION) {
wpa_printf(MSG_INFO, "WPS UPnP: subscr_addr_add_url: "
/* Limit no. of address to avoid denial of service attack */
if (dl_list_len(&s->addr_list) >= MAX_ADDR_PER_SUBSCRIPTION) {
wpa_printf(MSG_INFO, "WPS UPnP: subscr_addr_add_url: "
@@
-390,14
+391,12
@@
static void subscr_addr_add_url(struct subscription *s, const char *url)
a->saddr.sin_port = htons(port);
dl_list_add(&s->addr_list, &a->list);
a->saddr.sin_port = htons(port);
dl_list_add(&s->addr_list, &a->list);
- a = NULL; /* don't free it below */
}
fail:
if (result)
freeaddrinfo(result);
os_free(scratch_mem);
}
fail:
if (result)
freeaddrinfo(result);
os_free(scratch_mem);
- os_free(a);
}
}