Browse Source

WPS UPnP: Fix memory leak on retry case

The event entry needs to be freed when giving up on retries.
Jouni Malinen 14 years ago
parent
commit
1f1d4df09a
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/wps/wps_upnp_event.c

+ 1 - 0
src/wps/wps_upnp_event.c

@@ -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);