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
Split bug fix #206
Split bug fix #206
Conversation
Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com>
Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, works locally for me, and the test doesn't have any leaks from valgrind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks OK to me. Do we have a test that covers this particular corner-case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A test validating this bugfix would be nice, yeah.
Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM pending green CI
Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com>
Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me with green CI.
This is a bug I encountered adding tests for the split.c module. When calling the split function with the following str
"my//hello//world/////"
and this delimiter'/'
, the module crashes trying to free a memory not allocated.In Line 81 it can be seen the behavior expected for consecutive delimiters, no deallocation is required there.