httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_include.c
Date Mon, 31 Dec 2001 06:01:09 GMT
wrowe       01/12/30 22:01:09

  Modified:    modules/filters mod_include.c
  Log:
    We never test for success in memory allocation
  
  Revision  Changes    Path
  1.179     +17 -22    httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.178
  retrieving revision 1.179
  diff -u -r1.178 -r1.179
  --- mod_include.c	31 Dec 2001 05:58:58 -0000	1.178
  +++ mod_include.c	31 Dec 2001 06:01:09 -0000	1.179
  @@ -316,8 +316,8 @@
   
   /* We've now found a start sequence tag... */
   static apr_bucket* found_start_sequence(apr_bucket *dptr,
  -                                          include_ctx_t *ctx, 
  -                                          int tagStart)
  +                                        include_ctx_t *ctx, 
  +                                        int tagStart)
   {
       /* We want to split the bucket at the '<'. */
       ctx->state = PARSE_DIRECTIVE;
  @@ -3132,26 +3132,21 @@
   
       if (!f->ctx) {
           f->ctx = ctx = apr_pcalloc(f->c->pool, sizeof(*ctx));
  -        if (ctx != NULL) {
  -            ctx->state = PRE_HEAD;
  -            ctx->flags = (FLAG_PRINTING | FLAG_COND_TRUE);
  -            if (ap_allow_options(r) & OPT_INCNOEXEC) {
  -                ctx->flags |= FLAG_NO_EXEC;
  -            }
  -            ctx->ssi_tag_brigade = apr_brigade_create(f->c->pool);
  -            ctx->status = APR_SUCCESS;
  -
  -            ctx->error_str = conf->default_error_msg;
  -            ctx->time_str = conf->default_time_fmt;
  -            ctx->pool = f->c->pool;
  -            ctx->start_seq_pat = &sconf->start_seq_pat;
  -            ctx->start_seq  = sconf->default_start_tag;
  -            ctx->start_seq_len = sconf->start_tag_len;
  -            ctx->end_seq = sconf->default_end_tag;
  -        }
  -        else {
  -            return ap_pass_brigade(f->next, b);
  -        }
  +        ctx->state = PRE_HEAD;
  +        ctx->flags = (FLAG_PRINTING | FLAG_COND_TRUE);
  +        if (ap_allow_options(r) & OPT_INCNOEXEC) {
  +            ctx->flags |= FLAG_NO_EXEC;
  +        }
  +        ctx->ssi_tag_brigade = apr_brigade_create(f->c->pool);
  +        ctx->status = APR_SUCCESS;
  +
  +        ctx->error_str = conf->default_error_msg;
  +        ctx->time_str = conf->default_time_fmt;
  +        ctx->pool = f->c->pool;
  +        ctx->start_seq_pat = &sconf->start_seq_pat;
  +        ctx->start_seq  = sconf->default_start_tag;
  +        ctx->start_seq_len = sconf->start_tag_len;
  +        ctx->end_seq = sconf->default_end_tag;
       }
       else {
           ctx->bytes_parsed = 0;
  
  
  

Mime
View raw message