Index: trunk/zoo-project/zoo-services/gdal/profile/service.c
===================================================================
--- trunk/zoo-project/zoo-services/gdal/profile/service.c	(revision 917)
+++ trunk/zoo-project/zoo-services/gdal/profile/service.c	(revision 945)
@@ -182,6 +182,6 @@
 #endif
   }
+  GDALClose(hDataset);
   OGRCleanupAll();
-  GDALClose(hDataset);
   GDALDestroyDriverManager();
 #ifdef ZOO_SERVICE
