Skip to content

Memory leaks when calling C.CString #2

Open
@bduffany

Description

@bduffany

I found a memory leak in https://github.com/buildbuddy-io/buildbuddy/pull/2686/files in the way we were calling C.clonefile, and was curious if anybody else on GitHub was using the same problematic code pattern.

While searching across code on GitHub I found that this package has a few instances where C.CString is called, but C.free is not called on the result, which causes a memory leak for long-running applications:

Not sure if this package is still maintained but figured I'd report it.

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