Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leaks in file consumer #77

Open
ildus opened this issue Jan 15, 2020 · 0 comments
Open

Memory leaks in file consumer #77

ildus opened this issue Jan 15, 2020 · 0 comments

Comments

@ildus
Copy link
Contributor

ildus commented Jan 15, 2020

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant