Correction of a memory leak