httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: httpd-2.0/modules/http http_protocol.c
Date Thu, 05 Sep 2002 06:20:02 GMT
brianp      2002/09/04 23:20:02

  Modified:    modules/http http_protocol.c
  Log:
  Free the temporary working brigade upon exit from ap_get_client_block()
  
  Revision  Changes    Path
  1.456     +7 -0      httpd-2.0/modules/http/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
  retrieving revision 1.455
  retrieving revision 1.456
  diff -u -r1.455 -r1.456
  --- http_protocol.c	1 Sep 2002 18:31:30 -0000	1.455
  +++ http_protocol.c	5 Sep 2002 06:20:02 -0000	1.456
  @@ -1824,6 +1824,10 @@
       apr_bucket_brigade *bb;
   
       bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
  +    if (bb == NULL) {
  +        r->connection->keepalive = AP_CONN_CLOSE;
  +        return -1;
  +    }
   
       rv = ap_get_brigade(r->input_filters, bb, AP_MODE_READBYTES,
                           APR_BLOCK_READ, bufsiz);
  @@ -1836,6 +1840,7 @@
            * stop trying to read data from the client.
            */
           r->connection->keepalive = AP_CONN_CLOSE;
  +        apr_brigade_destroy(bb);
           return -1;
       }
   
  @@ -1847,12 +1852,14 @@
    
       rv = apr_brigade_flatten(bb, buffer, &bufsiz);
       if (rv != APR_SUCCESS) {
  +        apr_brigade_destroy(bb);
           return -1;
       }
   
       /* XXX yank me? */
       r->read_length += bufsiz;
   
  +    apr_brigade_destroy(bb);
       return bufsiz;
   }
   
  
  
  

Mime
View raw message