Opened 7 years ago
Closed 7 years ago
#1482 closed defect (fixed)
Memory leak in error handling block in ngx_stream_geo_block method
Reported by: | Owned by: | Ruslan Ermilov | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | other | Version: | 1.13.x |
Keywords: | Cc: | ||
uname -a: | |||
nginx -V: | nginx-1.13.8 |
Description
Source: nginx-1.13.8
File: nginx-1.13.8/src/stream/ngx_stream_geo_module.c
Function: static char *
ngx_stream_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
Code snippet:
...
...
pool = ngx_create_pool(NGX_DEFAULT_POOL_SIZE, cf->log);
if (pool == NULL) {
return NGX_CONF_ERROR;
}
ngx_memzero(&ctx, sizeof(ngx_stream_geo_conf_ctx_t));
ctx.temp_pool = ngx_create_pool(NGX_DEFAULT_POOL_SIZE, cf->log);
if (ctx.temp_pool == NULL) {
return NGX_CONF_ERROR;
}
...
Here, if the creation of ctx.temp_pool fails, shouldn't the "pool" variable created above be freed before return?
Change History (2)
comment:1 by , 7 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
In 7213:c69c13f10502/nginx: