]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix OOM handling in neighbor report response handling
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 3 Jan 2017 15:31:32 +0000 (17:31 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 3 Jan 2017 17:53:03 +0000 (19:53 +0200)
The pending neighbor report state needs to be cleared on error path here
to avoid getting stuck with being unable to perform any additional
neighbor reports during the association.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/rrm.c

index 7a10a00fc0e3e948291a2da5797ad062cef55d45..942eea79da192f674669d8ca6b7db263d5e61613 100644 (file)
@@ -85,8 +85,10 @@ void wpas_rrm_process_neighbor_rep(struct wpa_supplicant *wpa_s,
 
        /* skipping the first byte, which is only an id (dialog token) */
        neighbor_rep = wpabuf_alloc(report_len - 1);
-       if (neighbor_rep == NULL)
+       if (!neighbor_rep) {
+               wpas_rrm_neighbor_rep_timeout_handler(&wpa_s->rrm, NULL);
                return;
+       }
        wpabuf_put_data(neighbor_rep, report + 1, report_len - 1);
        wpa_printf(MSG_DEBUG, "RRM: Notifying neighbor report (token = %d)",
                   report[0]);