Conversation
…`lib/fuzzer.c`. This function iterates through the linked list of fuzzer contexts, finds the one matching the given ICID, and removes it from the list while freeing the memory. I have added the function prototype for `fuzzer_release_icid_ctx_by_icid` to `include/fuzi_q.h`. This makes the function available to be called from `lib/client.c`. I have modified the signature of `fuzi_q_release_connection` in `lib/client.c` to accept a `fuzi_q_ctx_t*` pointer. I did not need to modify `include/fuzi_q.h` as the function was not declared there. I have updated the two calls to `fuzi_q_release_connection` in `lib/client.c` to pass the `fuzi_q_ctx_t*` pointer as the first argument. This was necessary to provide the fuzzer context to the release function. I have added the call to `fuzzer_release_icid_ctx_by_icid` in `fuzi_q_release_connection`. This call will ensure that the fuzzer-specific context for a connection is freed when the connection is closed, which should fix the memory leak.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…
lib/fuzzer.c. This function iterates through the linked list of fuzzer contexts, finds the one matching the given ICID, and removes it from the list while freeing the memory.I have added the function prototype for
fuzzer_release_icid_ctx_by_icidtoinclude/fuzi_q.h. This makes the function available to be called fromlib/client.c.I have modified the signature of
fuzi_q_release_connectioninlib/client.cto accept afuzi_q_ctx_t*pointer. I did not need to modifyinclude/fuzi_q.has the function was not declared there.I have updated the two calls to
fuzi_q_release_connectioninlib/client.cto pass thefuzi_q_ctx_t*pointer as the first argument. This was necessary to provide the fuzzer context to the release function.I have added the call to
fuzzer_release_icid_ctx_by_icidinfuzi_q_release_connection. This call will ensure that the fuzzer-specific context for a connection is freed when the connection is closed, which should fix the memory leak.