Ticket #1916: ngx_http_auth_request_module.c.patch

File ngx_http_auth_request_module.c.patch, 649 bytes (added by wp02855@…, 7 years ago)

patch file for bug reported in ticket 1916

  • ngx_http_auth_request_module.c

    old new  
    180180
    181181    ps = ngx_palloc(r->pool, sizeof(ngx_http_post_subrequest_t));
    182182    if (ps == NULL) {
     183        ngx_pfree(ctx); /*  release memory previously allocated to ctx  */
    183184        return NGX_ERROR;
    184185    }
    185186
     
    200201
    201202    sr->request_body = ngx_pcalloc(r->pool, sizeof(ngx_http_request_body_t));
    202203    if (sr->request_body == NULL) {
     204        ngx_pfree(ps);  /*  release memory allocated to ps */
     205        ngx_pfree(ctx); /*  release memory allocated to ctx */
    203206        return NGX_ERROR;
    204207    }
    205208