]> granicus.if.org Git - apache/commitdiff
Create a subpool when we open the propdb, but we can't clear it until the rest
authorJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 23 Jan 2003 17:59:20 +0000 (17:59 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 23 Jan 2003 17:59:20 +0000 (17:59 +0000)
of the lifetime issues within mod_dav are straightened out.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98474 13f79535-47bb-0310-9956-ffa450edef68

modules/dav/main/props.c

index ca3c3f280525d1274c00848357027b651557c00a..d538725ad3c36442e53dfc3fa89e719b2aa81e6a 100644 (file)
@@ -571,7 +571,7 @@ dav_error *dav_open_propdb(request_rec *r, dav_lockdb *lockdb,
 #endif
 
     propdb->r = r;
-    propdb->p = r->pool; /* ### get rid of this */
+    apr_pool_create(&propdb->p, r->pool);
     propdb->resource = resource;
     propdb->ns_xlate = ns_xlate;
 
@@ -592,10 +592,15 @@ dav_error *dav_open_propdb(request_rec *r, dav_lockdb *lockdb,
 
 void dav_close_propdb(dav_propdb *propdb)
 {
-    if (propdb->db == NULL)
-        return;
+    if (propdb->db != NULL) {
+        (*propdb->db_hooks->close)(propdb->db);
+    }
 
-    (*propdb->db_hooks->close)(propdb->db);
+    /* Currently, mod_dav's pool usage doesn't clearing this pool. */
+#if 0
+    apr_pool_destroy(propdb->p);
+#endif
+    return;
 }
 
 dav_get_props_result dav_get_allprops(dav_propdb *propdb, dav_prop_insert what)