comparison src/http/ngx_http_core_module.c @ 2556:8ec97ff12a0a

fix segfaults introduced in r2549 and r2550
author Igor Sysoev <igor@sysoev.ru>
date Wed, 11 Mar 2009 13:04:02 +0000
parents 2d34fba7cf06
children c352c419be85
comparison
equal deleted inserted replaced
2555:0408f34ef7ea 2556:8ec97ff12a0a
1378 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 1378 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
1379 "test location: ~ \"%V\"", &(*clcfp)->name); 1379 "test location: ~ \"%V\"", &(*clcfp)->name);
1380 1380
1381 if ((*clcfp)->captures && r->captures == NULL) { 1381 if ((*clcfp)->captures && r->captures == NULL) {
1382 1382
1383 len = (NGX_HTTP_MAX_CAPTURES + 1) * 3 * sizeof(int); 1383 len = (NGX_HTTP_MAX_CAPTURES + 1) * 3;
1384 1384
1385 r->captures = ngx_palloc(r->pool, len); 1385 r->captures = ngx_palloc(r->pool, len * sizeof(int));
1386 if (r->captures == NULL) { 1386 if (r->captures == NULL) {
1387 return NGX_ERROR; 1387 return NGX_ERROR;
1388 } 1388 }
1389 } 1389 }
1390 1390