Fix memleaks in axiom/test_om