mirror of https://github.com/PatrickLipka/tt.git
Fixed missing delete of month_tmp in ignore_worktime case
This commit is contained in:
parent
ccb316781e
commit
3d418776f0
|
@ -147,17 +147,14 @@ void ProjectList::load(std::string file_name, bool ignore_worktimes){
|
||||||
size_t month_len;
|
size_t month_len;
|
||||||
if (!legacy_mode){
|
if (!legacy_mode){
|
||||||
// read month string from file
|
// read month string from file
|
||||||
|
|
||||||
inf.read((char*) &month_len,sizeof(size_t));
|
inf.read((char*) &month_len,sizeof(size_t));
|
||||||
char *month_tmp = new char[month_len+1];
|
char *month_tmp = new char[month_len+1];
|
||||||
inf.read(month_tmp,month_len);
|
inf.read(month_tmp,month_len);
|
||||||
if(!ignore_worktimes){
|
|
||||||
month_tmp[month_len] = '\0';
|
month_tmp[month_len] = '\0';
|
||||||
month = month_tmp;
|
month = month_tmp;
|
||||||
delete [] month_tmp;
|
delete [] month_tmp;
|
||||||
}else{
|
|
||||||
month=get_date();
|
if (ignore_worktimes) month=get_date();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inf.read((char*) &num_projects,sizeof(int));
|
inf.read((char*) &num_projects,sizeof(int));
|
||||||
|
|
Loading…
Reference in New Issue