-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve memory management in Channel (#368)
* Improve memory management in Channel * Use the gpr family of allocation functions instead of malloc/free (as these cannot return `NULL`). * Explicitly extend lifetime of `argumentWrappers` - Swift doesn't guarantee that objects will live to the end of their scope, so the optimizer is free to call Channel.Argument.Wrapper.deinit before the call to cgrpc_channel_create_secure, which would result in a use-after-free. * Also use gpr_free to free cgrpc_calls * Fix imports in call.c
- Loading branch information
Showing
3 changed files
with
24 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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