fix segfault introduced in r1780

This commit is contained in:
Igor Sysoev 2007-12-27 18:35:52 +00:00
parent 938d4993db
commit f25abef8dc

View File

@ -996,8 +996,10 @@ ngx_ssl_read_handler(ngx_event_t *rev)
void void
ngx_ssl_free_buffer(ngx_connection_t *c) ngx_ssl_free_buffer(ngx_connection_t *c)
{ {
if (ngx_pfree(c->pool, c->ssl->buf->start) == NGX_OK) { if (c->ssl->buf && c->ssl->buf->start) {
c->ssl->buf->start = NULL; if (ngx_pfree(c->pool, c->ssl->buf->start) == NGX_OK) {
c->ssl->buf->start = NULL;
}
} }
} }