[Openmp-commits] [PATCH] D26786: Fix memory leaks of buffer allocated in __kmp_str_format()
Andrey Churbanov via Openmp-commits
openmp-commits at lists.llvm.org
Mon Nov 21 08:00:06 PST 2016
AndreyChurbanov requested changes to this revision.
AndreyChurbanov added inline comments.
This revision now requires changes to proceed.
================
Comment at: runtime/src/kmp_i18n.c:151
// __kmp_i18n_catgets() will not try to open catalog, but will return default message.
- __kmp_msg(
- kmp_ms_warning,
- KMP_MSG( CantOpenMessageCatalog, name ),
- KMP_ERR( error ),
- KMP_HNT( CheckEnvVar, "NLSPATH", nlspath ),
+ kmp_msg_t err_code = KMP_ERR( error );
+ __kmp_msg(
----------------
Something is wrong with indents here. Please check that replacement of tabs with spaces done correctly in this code block.
================
Comment at: runtime/src/kmp_i18n.c:428
+ if (__kmp_generate_warnings == kmp_warnings_off) {
+ __kmp_str_free(&err_code.str);
+ }
----------------
It should be err_msg.str variable, not err_code.str. Or, alternatively, name it err_code in lines 419, 423 and here.
https://reviews.llvm.org/D26786
More information about the Openmp-commits
mailing list