Skip to content

Commit

Permalink
Fix alloc-dealloc mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
byronxu99 committed Aug 25, 2022
1 parent 4c07c2d commit 803ed65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vowpalwabbit/core/src/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ void enable_sources(VW::workspace& all, bool quiet, size_t passes, input_options
shared_data* sd = static_cast<shared_data*>(
mmap(nullptr, sizeof(shared_data), PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0));
new (sd) shared_data(*all.sd);
free(all.sd);
delete all.sd;
all.sd = sd;
all.example_parser->_shared_data = sd;

Expand Down

0 comments on commit 803ed65

Please sign in to comment.