Same problem as reported (and fixed) here: #2201
Buffer is being allocated if vsnprintf
reports 64 or more characters (due to the trailing \0):
|
if(len >= sizeof(loc_buf)){ |
|
temp = (char*)malloc(len+1); |
But the buffer is only being released if
more than 64 characters had been reported by
vsnprintf
:
|
if(len > 64){ |
|
free(temp); |
Probably related: #2033 (happens only when debug is on and free heap drops by 64 bytes each time)
Code to reproduce:
log_printf("1234567890123456789012345678901234567890123456789012345678901234");