Skip to content

Memory leak on get_map and get_map_bytesΒ #323

@JaatadiaMulesoft

Description

@JaatadiaMulesoft

In Optimize Vec allocations in map deserialization.

The following change was introduced for the get_map and get_map_bytes functions:
Vec::from_raw_parts(return_data, return_size, return_size);
was changed for
std::slice::from_raw_parts

Vec::from_raw_parts uses the Global allocator to properly deallocate the return data on drop. On the other hand the slice is not handling the deallocation and therfore producing a memory leak.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions