axmap: Avoid memory leak if axmap_new() failed

The axmap_new() function implements an exit path using the label "err"
to free the alloced memory.

That cleanup code was cleaning all the sub malloc structures but not the
main structure (axmap) itself resulting in a memory leak of
sizeof(struct axmap) bytes.

This simple patch just free axmap at the end of the cleanup code.
1 file changed