diff --git a/src/SERVER/DD_GetData.c b/src/SERVER/DD_GetData.c index 0c5ed09..4be5a88 100755 --- a/src/SERVER/DD_GetData.c +++ b/src/SERVER/DD_GetData.c @@ -307,8 +307,11 @@ int CloseID(int ID) { if (Verbose) fprintf(stderr,"CloseID(%d): %d, ptr %p\n",ID,i,DD_Var[ID]->VarData[il].Variables[i]); free(DD_Var[ID]->VarData[il].Variables[i]); - DD_Var[ID]->VarData[il].VarNumber = 0; + // DD_Var[ID]->VarData[il].VarNumber = 0; } + //EB - 19/01/16 - OUT of i-loop!!! + DD_Var[ID]->VarData[il].VarNumber = 0; + free(DD_Var[ID]->VarData[il].Dimensions); } if(DD_Var[ID]->ParamSize > 0) free(DD_Var[ID]->VarData); @@ -562,8 +565,10 @@ int GetAttribute(int ID, char *VarName) { //if (Verbose) fprintf(stderr," FREE ID = %d, il = %d, i = %d ptr %p\n",ID,il,i,DD_Var[ID]->VarData[il].Variables[i]); free(DD_Var[ID]->VarData[il].Variables[i]); - DD_Var[ID]->VarData[il].VarNumber = 0; + // DD_Var[ID]->VarData[il].VarNumber = 0; } + //EB - 19/01/16 - OUT of i-loop!!! + DD_Var[ID]->VarData[il].VarNumber = 0; //BRE - 17/09/15 - Free variables !! 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 -- libgit2 0.21.2