[mapserver-commits] r13268 - trunk/mapserver/mapcache/lib
svn at osgeo.org
svn at osgeo.org
Fri Mar 16 08:34:12 EDT 2012
Author: tbonfort
Date: 2012-03-16 05:34:12 -0700 (Fri, 16 Mar 2012)
New Revision: 13268
Modified:
trunk/mapserver/mapcache/lib/http.c
Log:
make valgrind happy in debug mode
Modified: trunk/mapserver/mapcache/lib/http.c
===================================================================
--- trunk/mapserver/mapcache/lib/http.c 2012-03-16 12:32:04 UTC (rev 13267)
+++ trunk/mapserver/mapcache/lib/http.c 2012-03-16 12:34:12 UTC (rev 13268)
@@ -297,10 +297,20 @@
return params;
}
+#ifdef DEBUG
+static void http_cleanup(void *dummy) {
+ curl_global_cleanup();
+}
+#endif
+
mapcache_http* mapcache_http_configuration_parse_xml(mapcache_context *ctx, ezxml_t node) {
ezxml_t http_node;
mapcache_http *req;
curl_global_init(CURL_GLOBAL_ALL);
+#ifdef DEBUG
+ /* make valgrind happy */
+ apr_pool_cleanup_register(ctx->pool, NULL,(void*)http_cleanup, apr_pool_cleanup_null);
+#endif
req = (mapcache_http*)apr_pcalloc(ctx->pool,
sizeof(mapcache_http));
if ((http_node = ezxml_child(node,"url")) != NULL) {
More information about the mapserver-commits
mailing list