Skip to content

Conversation

@timothy-king
Copy link

fp->size_cmd is set to allocated memory in kftp_parse_url() but this is not freed by knet_close(). The fix should be safe in other cases as these allocate the memory of fp via calloc leaving fp->size_cmd equal to NULL by default, and free(NULL) is a nop (https://linux.die.net/man/3/free).

Adds a test that builds knetfile.c.

fp->size_cmd is set to allocated memory in kftp_parse_url() but this is not freed by knet_close(). The fix should be safe in other cases as these allocate the memory of fp via calloc leaving fp->size_cmd equal to NULL by default, and free(NULL) is a nop (https://linux.die.net/man/3/free).

Adds a test that builds knetfile.c.
@timothy-king
Copy link
Author

If the test for that builds knetfile.c is too instrusive/hackish, it can be dropped.

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

Successfully merging this pull request may close these issues.

1 participant