r1318, r1319, r1320, r1321 merge:
fix various bugs found by Coverity's Scan
This commit is contained in:
parent
3e6256935f
commit
03e366afc3
|
@ -438,6 +438,9 @@ ngx_set_environment(ngx_cycle_t *cycle, ngx_uint_t *last)
|
|||
}
|
||||
|
||||
var = ngx_array_push(&ccf->env);
|
||||
if (var == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
var->len = 2;
|
||||
var->data = (u_char *) "TZ";
|
||||
|
|
|
@ -456,6 +456,9 @@ ngx_walk_tree(ngx_tree_ctx_t *ctx, ngx_str_t *tree)
|
|||
}
|
||||
|
||||
ctx->data = data;
|
||||
|
||||
} else {
|
||||
data = NULL;
|
||||
}
|
||||
|
||||
for ( ;; ) {
|
||||
|
@ -581,8 +584,8 @@ done:
|
|||
ngx_free(buf.data);
|
||||
}
|
||||
|
||||
if (ctx->alloc) {
|
||||
ngx_free(ctx->data);
|
||||
if (data) {
|
||||
ngx_free(data);
|
||||
ctx->data = prev;
|
||||
}
|
||||
|
||||
|
|
|
@ -163,6 +163,7 @@ ngx_palloc(ngx_pool_t *pool, size_t size)
|
|||
|
||||
large = ngx_palloc(pool, sizeof(ngx_pool_large_t));
|
||||
if (large == NULL) {
|
||||
ngx_free(p);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -439,6 +439,8 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||
if (rc == NGX_ERROR || rc == NGX_AGAIN) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue