]> git.kaiwu.me - njs.git/commitdiff
Fixed ngx_http_js_loc_conf_t initialization.
authorSergey Kandaurov <pluknet@nginx.com>
Wed, 23 Sep 2015 11:20:13 +0000 (14:20 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Wed, 23 Sep 2015 11:20:13 +0000 (14:20 +0300)
It is expected to be prezeroed.

nginx/ngx_http_js_module.c

index a888744b9f0deeffd2d4d816e77543d4ebd9f2ba..5df2138d3756edc4aee4382ba4ef15d112256a19 100644 (file)
@@ -1176,7 +1176,7 @@ ngx_http_js_create_loc_conf(ngx_conf_t *cf)
 {
     ngx_http_js_loc_conf_t  *conf;
 
-    conf = ngx_palloc(cf->pool, sizeof(ngx_http_js_loc_conf_t));
+    conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_js_loc_conf_t));
     if (conf == NULL) {
         return NULL;
     }