Skip to content

Memory Leak (global handles) when passing null as opaque argument to produce()Β #1127

@lassic

Description

@lassic

https://github.com/Blizzard/node-rdkafka/blob/master/src/producer.cc#L559

We're seen a memory leak passing null as the opaque argument to produce.
This was subtle and tough to debug, and is quite surprising behavior.
I think the 5th argument check should also include !IsNull much like the 4th argument.
Otherwise, global (persistent) handles are leaked wrapping a null value, which doesn't make sense.

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