Skip to content
Open
Changes from all commits
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
10 changes: 7 additions & 3 deletions os_dep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1822,9 +1822,13 @@ void GC_register_data_segments(void)

GC_INNER void GC_add_current_malloc_heap(void)
{
struct GC_malloc_heap_list *new_l =
malloc(sizeof(struct GC_malloc_heap_list));
void * candidate = GC_get_allocation_base(new_l);
struct GC_malloc_heap_list *new_l;
void * candidate;

if (!GC_no_win32_dlls) return;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Condition is wrong. Should be: if (GC_no_win32_dlls) return;


new_l = malloc(sizeof(struct GC_malloc_heap_list));
candidate = GC_get_allocation_base(new_l);

if (new_l == 0) return;
if (GC_is_malloc_heap_base(candidate)) {
Expand Down