messaging3: Use "goto fail_nomem" where appropriate