From: William A. Rowe Jr Date: Mon, 31 Dec 2001 06:01:09 +0000 (+0000) Subject: We never test for success in memory allocation X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=534b4bca2974620ba031d467d9579a664681b099;p=apache We never test for success in memory allocation git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92677 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 8906f7fe5b..6083b99735 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -316,8 +316,8 @@ static apr_size_t bndm(const char *n, apr_size_t nl, const char *h, /* 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 @@ static apr_status_t includes_filter(ap_filter_t *f, apr_bucket_brigade *b) 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;