comparison src/http/ngx_http_upstream.c @ 5667:16405e02e612

Upstream: for ssl name, non-aligned memory allocation is enough.
author Ruslan Ermilov <ru@nginx.com>
date Tue, 22 Apr 2014 18:56:49 +0400
parents 060c2e692b96
children 3a48775f1535
comparison
equal deleted inserted replaced
5666:a77c0839c993 5667:16405e02e612
1509 /* 1509 /*
1510 * SSL_set_tlsext_host_name() needs a null-terminated string, 1510 * SSL_set_tlsext_host_name() needs a null-terminated string,
1511 * hence we explicitly null-terminate name here 1511 * hence we explicitly null-terminate name here
1512 */ 1512 */
1513 1513
1514 p = ngx_palloc(r->pool, name.len + 1); 1514 p = ngx_pnalloc(r->pool, name.len + 1);
1515 if (p == NULL) { 1515 if (p == NULL) {
1516 return NGX_ERROR; 1516 return NGX_ERROR;
1517 } 1517 }
1518 1518
1519 (void) ngx_cpystrn(p, name.data, name.len + 1); 1519 (void) ngx_cpystrn(p, name.data, name.len + 1);