+* Mon Jun 05 2006 Andrew McNab <Andrew.McNab@man.ac.uk>
+- Remove malloc/free for header/footer in mod_gridsite
+* Mon Jun 05 2006 Andrew McNab <Andrew.McNab@man.ac.uk>
+- ==== GridSite version 1.2.2 ====
* Fri May 26 2006 Andrew McNab <Andrew.McNab@man.ac.uk>
- ==== GridSite version 1.2.1 ====
* Mon Apr 24 2006 Andrew McNab <Andrew.McNab@man.ac.uk>
/* first make a buffer big enough to hold path names we want to try */
fd = -1;
- s = malloc(strlen(r->filename) + strlen(conf->headfile) + 1);
+ s = apr_palloc(r->pool,
+ strlen(r->filename) + strlen(conf->headfile) + 1);
strcpy(s, r->filename);
for (;;)
*p = '\0';
}
- free(s);
-
if (fd == -1) /* not found, so set up not to output one */
{
head_formatted = apr_pstrdup(r->pool, "");
/* first make a buffer big enough to hold path names we want to try */
fd = -1;
- s = malloc(strlen(r->filename) + strlen(conf->footfile));
+ s = apr_palloc(r->pool,
+ strlen(r->filename) + strlen(conf->footfile) + 1);
strcpy(s, r->filename);
for (;;)
*p = '\0';
}
- free(s);
-
if (fd == -1) /* failed to find a footer, so set up empty default */
{
footer_formatted = apr_pstrdup(r->pool, "");
struct dirent **namelist;
if (r->finfo.filetype == APR_NOFILE) return HTTP_NOT_FOUND;
-
/* Put in Delegation service header if required */
if (conf->delegationuri) delegation_header(r, conf);
/* first make a buffer big enough to hold path names we want to try */
fd = -1;
- s = malloc(strlen(r->filename) + strlen(conf->headfile) + 1);
+ s = apr_palloc(r->pool,
+ strlen(r->filename) + strlen(conf->headfile) + 1);
strcpy(s, r->filename);
for (;;)
*p = '\0';
}
- free(s);
-
if (fd == -1) /* not found, so set up to output sensible default */
{
header_formatted = apr_pstrdup(r->pool, "<body bgcolor=white>");
/* first make a buffer big enough to hold path names we want to try */
fd = -1;
- s = malloc(strlen(r->filename) + strlen(conf->footfile));
+ s = apr_palloc(r->pool,
+ strlen(r->filename) + strlen(conf->footfile) + 1);
strcpy(s, r->filename);
for (;;)
*p = '\0';
}
- free(s);
-
if (fd == -1) /* failed to find a footer, so use standard default */
{
footer_formatted = apr_pstrdup(r->pool, "</body>");