mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 10:08:06 +02:00
[libply] Fix message list memleaks
This commit is contained in:
parent
e1541d73d2
commit
579419b01e
1 changed files with 26 additions and 0 deletions
|
|
@ -90,6 +90,32 @@ ply_progress_new (void)
|
|||
void
|
||||
ply_progress_free (ply_progress_t* progress)
|
||||
{
|
||||
ply_list_node_t *node;
|
||||
node = ply_list_get_first_node (progress->current_message_list);
|
||||
|
||||
while (node)
|
||||
{
|
||||
ply_list_node_t *next_node;
|
||||
ply_progress_message_t *message = ply_list_node_get_data (node);
|
||||
next_node = ply_list_get_next_node (progress->current_message_list, node);
|
||||
|
||||
free (message->string);
|
||||
node = next_node;
|
||||
}
|
||||
ply_list_free (progress->current_message_list);
|
||||
|
||||
node = ply_list_get_first_node (progress->previous_message_list);
|
||||
|
||||
while (node)
|
||||
{
|
||||
ply_list_node_t *next_node;
|
||||
ply_progress_message_t *message = ply_list_node_get_data (node);
|
||||
next_node = ply_list_get_next_node (progress->previous_message_list, node);
|
||||
|
||||
free (message->string);
|
||||
node = next_node;
|
||||
}
|
||||
ply_list_free (progress->previous_message_list);
|
||||
free(progress);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue