Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

memory leak in nrf_log_backend_cli_flush()

Hi, I am using SDK 15.2.0.

components/libraries/cli/nrf_cli.c:

static void nrf_log_backend_cli_flush(nrf_log_backend_t const * p_backend)
{
    nrf_cli_log_backend_t * p_backend_cli = (nrf_cli_log_backend_t *)p_backend->p_ctx;
    nrf_cli_t const *       p_cli = p_backend_cli->p_cli;
    nrf_log_entry_t *       p_msg;

    if (nrf_queue_pop(p_backend_cli->p_queue, &p_msg) == NRF_SUCCESS)
    {
        (void)cli_log_entry_process(p_cli, false);
    }
    UNUSED_PARAMETER(p_backend);
}

The p_msg dropped from the queue without nrf_memobj_put(p_msg).

Parents Reply Children
Related