Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2cbc99c3 authored by Sourav Mohapatra's avatar Sourav Mohapatra Committed by nshrivas
Browse files

qcacld-3.0: Free link_layer_stats results properly

As per the logic implemented in the FW, it will send a dummy event for
link layer stats in case the buffer allocation fails. In this case,
there can occur a scenario in host wherein we are not properly freeing
the previously allocated memory.

In the event handler wma_unified_link_radio_stats_event_handler, if the
event is dummy, we are updating the value of the num_radios inside
wma_handle->link_layer_results. This num_radios is later used to free
any allocated memory. On setting it to zero, we are preventing that
memfree to occur; leading to a memleak.

To fix this, in case there is a dummy event, first free any possible
previous results before setting the num_radios to be zero.

Change-Id: Ibe4ddf1a137a33130100483cefb004b7dae4ce02
CRs-Fixed: 2610754
parent 82305254
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment