Fixed memory leak in ipc module.