Open
Conversation
Fixed crash when __redisAsyncFree is called if redisLibuvAttach has not completed
| static void redisLibuvCleanup(void *privdata) { | ||
| redisLibuvEvents* p = (redisLibuvEvents*)privdata; | ||
|
|
||
| if (p == NULL) |
Contributor
There was a problem hiding this comment.
- It's not a good practice, to add such checks, because they could affect performance.
- You couldn't check redundant cleanups in client code, if it's needed.
- It's better to make early return before casting on line 131.
Author
There was a problem hiding this comment.
Hi Mark
- This is a best practice to check variables
- This is internal function calls from driver
- May be
P.s. Марк, ты вообще офигел :)
Я сейчас вспомню Серафим и всякое разное :)
Contributor
AgranatMarkit
approved these changes
Nov 20, 2023
AgranatMarkit
approved these changes
Nov 20, 2023
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.
Fixed crash when __redisAsyncFree is called if redisLibuvAttach has not completed
` context = redisAsyncConnect(host, port);
`