Commit ae283410a535afb4c1c619dc4064529061419b75
1 parent
04665ce5
Exists in
master
and in
10 other branches
Free varaibles memory only if Request been finished or System was trying to open new file
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
src/SERVER/DD_GetData.c
... | ... | @@ -588,7 +588,9 @@ int GetAttribute(int ID, char *VarName) |
588 | 588 | DD_Var[ID]->VarData[il].VarNumber = 0; |
589 | 589 | } |
590 | 590 | //BRE - 17/09/15 - Free variables !! |
591 | - free(DD_Var[ID]->VarData[il].Variables); | |
591 | + if((DD_Var[ID]->LastPacketFlag == OK) || DD_Var[ID]->NewFile) // Request been finished or | |
592 | + // System was trying to open new file | |
593 | + free(DD_Var[ID]->VarData[il].Variables); | |
592 | 594 | } |
593 | 595 | |
594 | 596 | /*============================================================================ | ... | ... |