winio: change memory allocation strategy and fix double free errors.

This fixes the double free error present in Winio by changing to a managed memory allocation method.

A more elaborate description is in the note.

Fixes #18381 (closed)

Merge request reports

Loading