case change, free mem and return in macro.h