]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS UPnP: Fix memory leak on retry case
authorJouni Malinen <j@w1.fi>
Sun, 17 Oct 2010 17:22:03 +0000 (20:22 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 17 Oct 2010 17:22:03 +0000 (20:22 +0300)
The event entry needs to be freed when giving up on retries.

src/wps/wps_upnp_event.c

index 628069a054e31301325b19025da08917ffd7b3a5..635deeab00352b704892831961c677056e563a52 100644 (file)
@@ -130,6 +130,7 @@ static void event_retry(struct wps_event_ *e, int do_next_address)
        if (e->retry >= dl_list_len(&s->addr_list)) {
                wpa_printf(MSG_DEBUG, "WPS UPnP: Giving up on sending event "
                           "for %s", e->addr->domain_and_port);
+               event_delete(e);
                return;
        }
        dl_list_add(&s->event_queue, &e->list);