From 1198812b0776937f3aafaccdc3950a26bb1457d4 Mon Sep 17 00:00:00 2001 From: Charlie Savage Date: Sun, 16 Apr 2023 23:49:53 -0700 Subject: [PATCH] Fix crash in merging. --- ext/ruby_prof/rp_call_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ruby_prof/rp_call_tree.c b/ext/ruby_prof/rp_call_tree.c index 1e72ab38..6842c647 100644 --- a/ext/ruby_prof/rp_call_tree.c +++ b/ext/ruby_prof/rp_call_tree.c @@ -382,7 +382,7 @@ static int prof_call_tree_merge_children(st_data_t key, st_data_t value, st_data prof_method_t* method_ptr = method_table_lookup(self_info->method_table, other_child_ptr->method->key); // Now copy the other call tree, reset its method pointer, and add it as a child - prof_call_tree_t* self_child = prof_call_tree_copy(other_child_ptr); + self_child = prof_call_tree_copy(other_child_ptr); self_child->method = method_ptr; prof_call_tree_add_child(self_ptr, self_child);