Skip to content
Permalink
Browse files

fm-tree-model: Fix use of memory after it is freed

to avoid warning with Clang Analyzer
  • Loading branch information...
sc0w committed Feb 24, 2019
1 parent 7c9ae01 commit 1848d37c4ddb0d4d5b20f5bbb99b94e22aae68e7
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/file-manager/fm-tree-model.c
@@ -779,9 +779,13 @@ stop_monitoring_directory (FMTreeModel *model, TreeNode *node)
static void
destroy_children_without_reporting (FMTreeModel *model, TreeNode *parent)
{
while (parent->first_child != NULL)
TreeNode *current_child = parent->first_child;
TreeNode *next_child;
while (current_child != NULL)
{
destroy_node_without_reporting (model, parent->first_child);
next_child = current_child->next;
destroy_node_without_reporting (model, current_child);
current_child = next_child;
}
}

0 comments on commit 1848d37

Please sign in to comment.
You can’t perform that action at this time.