diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2014-06-26 03:34:13 +0400 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2014-06-26 03:34:13 +0400 |
commit | 25250a20d2827954d427222f1f4b1e26c8729d7f (patch) | |
tree | 9df86f23f6d5928d542ac8ce0246b532c4f91f09 /src | |
parent | 1a5cdafa829b30a5b16a29bfb2a589d7ded04d65 (diff) | |
download | nginx-25250a20d2827954d427222f1f4b1e26c8729d7f.tar.gz nginx-25250a20d2827954d427222f1f4b1e26c8729d7f.zip |
Fixed wrong sizeof() in ngx_http_init_locations().
There is no real difference on all known platforms, but it's still wrong.
Found by Coverity (CID 400876).
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c index ce5adb737..31577f9a2 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -742,7 +742,7 @@ ngx_http_init_locations(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf, if (named) { clcfp = ngx_palloc(cf->pool, - (n + 1) * sizeof(ngx_http_core_loc_conf_t **)); + (n + 1) * sizeof(ngx_http_core_loc_conf_t *)); if (clcfp == NULL) { return NGX_ERROR; } @@ -768,7 +768,7 @@ ngx_http_init_locations(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf, if (regex) { clcfp = ngx_palloc(cf->pool, - (r + 1) * sizeof(ngx_http_core_loc_conf_t **)); + (r + 1) * sizeof(ngx_http_core_loc_conf_t *)); if (clcfp == NULL) { return NGX_ERROR; } |