Fixed two small memory leaks. TRQ-2498