fixed memory leak in tools.c and fixed allocation size of ChanUser entries