-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* * memory leak issues memory allocated from rcutils_format_string() is relatively easy easy to forget to free and this leaks system resource. A wrapper API added to make it shared and centralized Signed-off-by: Ethan Gao <ethan.gao@linux.intel.com> * * Define a helper MACRO and fix memory leak with it define the macro RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING to help format error string and fix those memory leak issues with this marco Signed-off-by: Ethan Gao <ethan.gao@linux.intel.com> * fixup documentation and variable names * adjust header file and add marco namespace * avoid unknown free to invalid address If the `goto fail;` at a certain allocation failure in the middle, just to free those memory before it in `rcutils_string_array_fini()`, those after that failure is invalid * tweak marco definition to be safer while using * minor grammar fix * write out error in rcutils_string_array_fini * typo * missing continuation in macro * uncrustify * remove unused variable * while (0) -> while (false) reapplied from 536ae0e
- Loading branch information
Showing
3 changed files
with
33 additions
and
7 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