ftest: debug memory leak in progress bar
This commit is contained in:
Binary file not shown.
@@ -275,14 +275,14 @@ void setup_variables_before_exec(){
|
|||||||
char *tmp_bp=malloc(len_bp+1);
|
char *tmp_bp=malloc(len_bp+1);
|
||||||
strcpy(tmp_bp,bar_progress);
|
strcpy(tmp_bp,bar_progress);
|
||||||
tmp_bp[2]='u';
|
tmp_bp[2]='u';
|
||||||
free(bar_progress);
|
//free(bar_progress);
|
||||||
bar_progress=tmp_bp;
|
bar_progress=tmp_bp;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
char *tmp_bp=malloc(len_bp);
|
char *tmp_bp=malloc(len_bp);
|
||||||
strcpy(tmp_bp,default_bar_progress);
|
strcpy(tmp_bp,default_bar_progress);
|
||||||
tmp_bp[2]='u';
|
tmp_bp[2]='u';
|
||||||
free(default_bar_progress);
|
//free(default_bar_progress);
|
||||||
default_bar_progress=tmp_bp;
|
default_bar_progress=tmp_bp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1519,6 +1519,8 @@ __attribute__((destructor))
|
|||||||
void
|
void
|
||||||
purge_tests()
|
purge_tests()
|
||||||
{
|
{
|
||||||
|
if(strcmp(default_bar_progress," c")) free(default_bar_progress);
|
||||||
|
if(strcmp(bar_progress," c")) free(bar_progress);
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
clear_all_func(&f_beging);
|
clear_all_func(&f_beging);
|
||||||
|
|||||||
Reference in New Issue
Block a user