mirror of
https://github.com/curl/curl.git
synced 2026-07-22 22:37:16 +03:00
a slightly involved work-around to prevent the debug-tracing from logging
a free-without-alloc as the first call
This commit is contained in:
parent
289a42f050
commit
9864bf703d
1 changed files with 6 additions and 1 deletions
|
|
@ -2934,8 +2934,13 @@ operate(struct Configurable *config, int argc, char *argv[])
|
|||
env = curlx_getenv("CURL_MEMDEBUG");
|
||||
if(env) {
|
||||
/* use the value as file name */
|
||||
curl_memdebug(env);
|
||||
char *s = strdup(env);
|
||||
curl_free(env);
|
||||
curl_memdebug(s);
|
||||
free(s);
|
||||
/* this weird strdup() and stuff here is to make the curl_free() get
|
||||
called before the memdebug() as otherwise the memdebug tracing will
|
||||
with tracing a free() without an alloc! */
|
||||
}
|
||||
env = curlx_getenv("CURL_MEMLIMIT");
|
||||
if(env) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue