Skip to content

Memory leaks in file consumer #77

@ildus

Description

@ildus

Briefly looked up file consumer and noticed the possibility of the memory leak. I suppose message_free should also free the related data. For example the memory allocated by getline assigned to data field, and it should be eventually freed in message_free.

Man says If *lineptr is set to NULL and *n is set 0 before the call, then getline() will allocate a buffer for storing the line. This buffer should be freed by the user program even if getline() failed.

free(*msg);

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