Fixed memory leaks in EDL2.