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 authored and github-actions committed Aug 19, 2021
commit c296b5c98be24e057cc7e81ae8ae1ca9c3301913
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 @@ -9292,9 +9292,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 @@ -9346,9 +9349,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