httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@covalent.net>
Subject Re: cvs commit: httpd-2.0/server core.c
Date Thu, 21 Feb 2002 19:05:03 GMT
From: "Cliff Woolley" <jwoolley@virginia.edu>
Sent: Thursday, February 21, 2002 12:28 PM


> On 21 Feb 2002 wrowe@apache.org wrote:
> 
> >            e = apr_bucket_file_create(fd, 0, AP_MAX_SENDFILE, r->pool);
> >            while (fsize > AP_MAX_SENDFILE) {
> >   -            APR_BRIGADE_INSERT_TAIL(bb, e);
> >   -            apr_bucket_copy(e, &e);
> >   +            apr_bucket *ce;
> >   +            apr_bucket_copy(e, &ce);
> >   +            APR_BRIGADE_INSERT_TAIL(bb, ce);
> >                e->start += AP_MAX_SENDFILE;
> >                fsize -= AP_MAX_SENDFILE;
> >            }
> 
> At first I thought this was giving a duplicate copy of the first bucket,
> but then I realized that by moving the INSERT call down, you've avoided
> that problem.  However, aren't we leaking e?

No, because e is then is then inserted at the tail after the while {} loop.


Mime
View raw message