fixed memory leak in standard C files