Update output.c
Fixed memory leak in saveoutput() where temporary array "x" was allocated but never freed
This commit is contained in:
@@ -338,6 +338,8 @@ int saveoutput()
|
|||||||
/* Write out node results, then link results */
|
/* Write out node results, then link results */
|
||||||
for (j=DEMAND; j<=QUALITY; j++) ERRCODE(nodeoutput(j,x,Ucf[j]));
|
for (j=DEMAND; j<=QUALITY; j++) ERRCODE(nodeoutput(j,x,Ucf[j]));
|
||||||
for (j=FLOW; j<=FRICTION; j++) ERRCODE(linkoutput(j,x,Ucf[j]));
|
for (j=FLOW; j<=FRICTION; j++) ERRCODE(linkoutput(j,x,Ucf[j]));
|
||||||
|
|
||||||
|
free(x);
|
||||||
return(errcode);
|
return(errcode);
|
||||||
} /* End of saveoutput */
|
} /* End of saveoutput */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user