Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixing leak.
  • Loading branch information
thaystg committed Aug 19, 2021
commit 11b8986a46f4375248483b408c3037df44d812b8
18 changes: 12 additions & 6 deletions src/mono/mono/component/debugger-agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -9285,9 +9285,12 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
MonoDebugLocalsInfo *locals;

locals = mono_debug_lookup_locals (frame->de.method);
if (locals && CHECK_ICORDBG (FALSE)) { //on icordbg the index value is correct, we don't need to fix it.
g_assert (pos < locals->num_locals);
pos = locals->locals [pos].index;
if (locals) {
if (CHECK_ICORDBG (FALSE)) //on icordbg the index value is correct, we don't need to fix it.
{
g_assert (pos < locals->num_locals);
pos = locals->locals [pos].index;
}
mono_debug_free_locals (locals);
}

Expand Down Expand Up @@ -9339,9 +9342,12 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
MonoDebugLocalsInfo *locals;

locals = mono_debug_lookup_locals (frame->de.method);
if (locals && CHECK_ICORDBG (FALSE)) {
g_assert (pos < locals->num_locals);
pos = locals->locals [pos].index;
if (locals) {
if (CHECK_ICORDBG (FALSE))
{
g_assert (pos < locals->num_locals);
pos = locals->locals [pos].index;
}
mono_debug_free_locals (locals);
}
g_assert (pos >= 0 && pos < jit->num_locals);
Expand Down