diff --git a/src/SERVER/DD_GetData.c b/src/SERVER/DD_GetData.c index 9d7643c..db388a9 100755 --- a/src/SERVER/DD_GetData.c +++ b/src/SERVER/DD_GetData.c @@ -588,9 +588,12 @@ int GetAttribute(int ID, char *VarName) DD_Var[ID]->VarData[il].VarNumber = 0; } //BRE - 17/09/15 - Free variables !! - if((DD_Var[ID]->LastPacketFlag == OK) || DD_Var[ID]->NewFile) // Request been finished or - // System was trying to open new file + if(((DD_Var[ID]->LastPacketFlag == OK) || DD_Var[ID]->NewFile) && (DD_Var[ID]->VarData[il].Variables != NULL)) // Request been finished or + // System was trying to open new file + { free(DD_Var[ID]->VarData[il].Variables); + DD_Var[ID]->VarData[il].Variables = NULL; + } } /*============================================================================ -- libgit2 0.21.2