-const char filters_rcs[] = "$Id: filters.c,v 1.95 2007/10/17 19:31:20 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.96 2007/10/19 16:53:28 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.c,v $
*
* Revisions :
* $Log: filters.c,v $
+ * Revision 1.96 2007/10/19 16:53:28 fabiankeil
+ * Add helper function to check if any content filters are enabled.
+ *
* Revision 1.95 2007/10/17 19:31:20 fabiankeil
* Omitting the zero chunk that ends the chunk transfer encoding seems
* to be the new black. Log the problem and continue filtering anyway.
*p++ = '\0';
if (ijb_isdigit(*p) == 0)
{
- free(acl_spec);
+ freez(acl_spec);
return(-1);
}
masklength = atoi(p);
if ((masklength < 0) || (masklength > 32))
{
- free(acl_spec);
+ freez(acl_spec);
return(-1);
}
if (port <= 0 || port > 65535 || *endptr != '\0')
{
- free(acl_spec);
+ freez(acl_spec);
return(-1);
}
}
aca->port = (unsigned long)port;
aca->addr = ntohl(resolve_hostname_to_ip(acl_spec));
- free(acl_spec);
+ freez(acl_spec);
if (aca->addr == INADDR_NONE)
{
log_error(LOG_LEVEL_ERROR, "Failed to append \'%s\' to trustfile \'%s\': %E",
new_entry, csp->config->trustfile);
}
- free(new_entry);
+ freez(new_entry);
}
else
{
current_hits += job_hits;
if (old != csp->iob->cur)
{
- free(old);
+ freez(old);
}
old = new;
}
*/
if (!hits)
{
- free(new);
+ freez(new);
return(NULL);
}
if (gif_deanimate(in, out, strncmp("last", csp->action->string[ACTION_STRING_DEANIMATE], 4)))
{
log_error(LOG_LEVEL_DEANIMATE, "failed! (gif parsing)");
- free(in);
+ freez(in);
buf_free(out);
return(NULL);
}
csp->content_length = out->offset;
csp->flags |= CSP_FLAG_MODIFIED;
p = out->buffer;
- free(in);
- free(out);
+ freez(in);
+ freez(out);
return(p);
}
if (jpeg_inspect(in, out))
{
log_error(LOG_LEVEL_DEANIMATE, "failed! (jpeg parsing)");
- free(in);
+ freez(in);
buf_free(out);
return(NULL);
csp->content_length = out->offset;
csp->flags |= CSP_FLAG_MODIFIED;
p = out->buffer;
- free(in);
- free(out);
+ freez(in);
+ freez(out);
return(p);
}