Skip to content

cef.zig: InstallResult.archive_path leaks on success #32

@versecafe

Description

@versecafe

installPrepared and installOfficial in src/tooling/cef.zig allocate archive_path via std.fs.path.join(allocator, ...) (lines 338 and 397). The errdefer allocator.free(archive_path) only covers error returns on success the slice is handed to the caller as InstallResult.archive_path.

The only caller, run() at line 284, never reads or frees that field, so the allocation leaks on every successful install.

Verified with std.testing.allocator:

[DebugAllocator] (err): memory address 0x105560400 leaked:
  std.fs.path.join ... src/tooling/cef.zig:341 in installPrepared
  src/tooling/cef.zig:322 in install

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