mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 04:04:31 +02:00
Merge branch 'bugfix/log_free_level_entry' into 'master'
log: fix minor memory leak when cleaning list of log levels Closes IDF-710 See merge request idf/esp-idf!5260
This commit is contained in:
@@ -174,8 +174,10 @@ void esp_log_level_set(const char* tag, esp_log_level_t level)
|
|||||||
|
|
||||||
void clear_log_level_list()
|
void clear_log_level_list()
|
||||||
{
|
{
|
||||||
while( !SLIST_EMPTY(&s_log_tags)) {
|
uncached_tag_entry_t *it;
|
||||||
|
while((it = SLIST_FIRST(&s_log_tags)) != NULL) {
|
||||||
SLIST_REMOVE_HEAD(&s_log_tags, entries );
|
SLIST_REMOVE_HEAD(&s_log_tags, entries );
|
||||||
|
free(it);
|
||||||
}
|
}
|
||||||
s_log_cache_entry_count = 0;
|
s_log_cache_entry_count = 0;
|
||||||
s_log_cache_max_generation = 0;
|
s_log_cache_max_generation = 0;
|
||||||
|
Reference in New Issue
Block a user