fix a regression in track_memory.awk (did not show leaking source code line)

This commit is contained in:
stefan schippers 2023-01-23 12:16:29 +01:00
parent cffe91146e
commit fd8f1e6b97
2 changed files with 3 additions and 2 deletions

View File

@ -342,7 +342,7 @@ unsigned char *ascii85_encode(const unsigned char *data, const size_t input_leng
encoded_data[idx]=b85_enc[encoded_data[idx]];
idx++;
}
my_free(1668, &paddedData);
/* my_free(1668, &paddedData); */
*output_length-=padding;
encoded_data[*output_length]=0;
return encoded_data;

View File

@ -75,7 +75,8 @@ END{
leak+= address[i]
print " address[ " i ", " idx[i] " ]= " address[i]
if(show_source) {
pipe = "egrep -n '^my_(malloc|calloc|realloc|free|strdup|strdup2)\\(" idx[i] ",' *.c xschem.h"
pipe = "egrep -n 'my_(malloc|calloc|realloc|free|strdup|strdup2)\\(" idx[i] ",' *.c xschem.h"
print pipe
while( pipe | getline a) print " " a
close(pipe)
}