Skip to content

win: memory leak in uv_os_tmpdir #4680

@YongyuanFu

Description

@YongyuanFu

this is our example:

char path[PATH_MAX] = "";
size_t size = sizeof(path);
value = uv_os_tmpdir(path, &size);

problem: While using uv_os_tmpdir on the Windows platform, we discovered a memory leak in the function. After testing, calling uv__free(path) before the return statement resolved the memory leak issue.

question: In version 1.44.2, uv_os_tmpdir calls uv__free right before the function returns. However, since version 1.47.0, the uv__free call has been removed. Do you think this is a bug, or is our usage incorrect?

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