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

Valgrind: Invalid read of size 4 after client disconnect #37

Closed
fraunhofer-iis-bot opened this issue Sep 13, 2021 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@fraunhofer-iis-bot
Copy link
Collaborator

In GitLab by @Michael-M-Baron on Sep 13, 2021, 11:35

The problem occurs in the main loop of the japi server while processing the received lines.
After a client is disconnected, the client object gets cleaned and freed with japi_remove_client(ctx,client->socket);
At the end of the loop, the client object is accessed again in the loop condition, but the memory has already been freed, what produces an error in valgrind.

Japi.c: Line 538

@fraunhofer-iis-bot
Copy link
Collaborator Author

In GitLab by @Michael-M-Baron on Sep 13, 2021, 11:35

created merge request !58 to address this issue

@fraunhofer-iis-bot
Copy link
Collaborator Author

In GitLab by @cstender on Sep 28, 2021, 16:32

Thanks a lot for spotting, debugging and fixing the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants