[axe.c] fix all coverity bugs

Mostly resource leaks on rare error conditions