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 628069a..635deea 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);