Fix rilmodem memory leaks