From: "Cliff Woolley" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 12:28 PM
> On 21 Feb 2002 [EMAIL PROTECTED] 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.