mirror of
https://github.com/curl/curl.git
synced 2026-06-25 23:35:40 +03:00
curlx: simplify the curlx_unicodefree macro
- explain its purpose in a comment Closes #17287
This commit is contained in:
parent
09fed29460
commit
1c6fc0cd2b
2 changed files with 5 additions and 8 deletions
|
|
@ -81,12 +81,7 @@ typedef union {
|
|||
|
||||
#endif /* UNICODE && _WIN32 */
|
||||
|
||||
#define curlx_unicodefree(ptr) \
|
||||
do { \
|
||||
if(ptr) { \
|
||||
(free)(CURL_UNCONST(ptr)); \
|
||||
(ptr) = NULL; \
|
||||
} \
|
||||
} while(0)
|
||||
/* the purpose of this macro is to free() without being traced by memdebug */
|
||||
#define curlx_unicodefree(ptr) (free)(CURL_UNCONST(ptr))
|
||||
|
||||
#endif /* HEADER_CURL_MULTIBYTE_H */
|
||||
|
|
|
|||
|
|
@ -3063,8 +3063,10 @@ ParameterError parse_args(struct GlobalConfig *global, int argc,
|
|||
&used, global, config);
|
||||
}
|
||||
|
||||
if(!result)
|
||||
if(!result) {
|
||||
unicodefree(orig_opt);
|
||||
orig_opt = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if(!result && config->content_disposition) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue