public UserAttributes getUserAttributes(String cqName) {
    try {
      return getCqService().getUserAttributes(cqName);
    } catch (CqException ce) {
      return null;
    }
  }
Close the CQ Service after clean up if any.
geode-core/src/main/java/org/apache/geode/cache/query/internal/DefaultQueryService.java