Fix leaks in OhmMsgFactory