const char *GDALProxyPoolRasterBand::GetUnitType() { GDALRasterBand* poUnderlyingRasterBand = RefUnderlyingRasterBand(); if (poUnderlyingRasterBand == NULL) return NULL; CPLFree(pszUnitType); pszUnitType = NULL; const char* pszUnderlyingUnitType = poUnderlyingRasterBand->GetUnitType(); if (pszUnderlyingUnitType) pszUnitType = CPLStrdup(pszUnderlyingUnitType); UnrefUnderlyingRasterBand(poUnderlyingRasterBand); return pszUnitType; }