Catch a few cases where we need to release memory resources on errors. Place parentheses around variables in macros.