Fix wpa_priv memory leak in wpa_priv_get_scan_results2()

I suspect that new scan results format demands more complex free
procedure.
This commit is contained in:
Dmitry Shmidt 2009-12-03 20:59:27 +02:00 committed by Jouni Malinen
parent 362bd35f2d
commit 4e2225a520

View file

@ -146,12 +146,12 @@ static void wpa_priv_get_scan_results2(struct wpa_priv_interface *iface,
sizeof(*from)); sizeof(*from));
os_free(buf); os_free(buf);
os_free(res); wpa_scan_results_free(res);
return; return;
fail: fail:
os_free(buf); os_free(buf);
os_free(res); wpa_scan_results_free(res);
sendto(iface->fd, "", 0, 0, (struct sockaddr *) from, sizeof(*from)); sendto(iface->fd, "", 0, 0, (struct sockaddr *) from, sizeof(*from));
} }