View | Details | Raw Unified | Return to bug 48130
Collapse All | Expand All

(-)httpd-2.2.21.orig/modules/dav/fs/repos.c (-1 / +7 lines)
Lines 1418-1423 Link Here
1418
    int isdir = fsctx->res1.collection;
1418
    int isdir = fsctx->res1.collection;
1419
    apr_finfo_t dirent;
1419
    apr_finfo_t dirent;
1420
    apr_dir_t *dirp;
1420
    apr_dir_t *dirp;
1421
    apr_pool_t *subpool;
1421
1422
1422
    /* ensure the context is prepared properly, then call the func */
1423
    /* ensure the context is prepared properly, then call the func */
1423
    err = (*params->func)(&fsctx->wres,
1424
    err = (*params->func)(&fsctx->wres,
Lines 1459-1468 Link Here
1459
        /* ### need a better error */
1460
        /* ### need a better error */
1460
        return dav_new_error(pool, HTTP_NOT_FOUND, 0, NULL);
1461
        return dav_new_error(pool, HTTP_NOT_FOUND, 0, NULL);
1461
    }
1462
    }
1463
    apr_pool_create(&subpool, pool);
1462
    while ((apr_dir_read(&dirent, APR_FINFO_DIRENT, dirp)) == APR_SUCCESS) {
1464
    while ((apr_dir_read(&dirent, APR_FINFO_DIRENT, dirp)) == APR_SUCCESS) {
1463
        apr_size_t len;
1465
        apr_size_t len;
1464
        apr_status_t status;
1466
        apr_status_t status;
1465
1467
1468
        apr_pool_clear(subpool);
1469
1466
        len = strlen(dirent.name);
1470
        len = strlen(dirent.name);
1467
1471
1468
        /* avoid recursing into our current, parent, or state directories */
1472
        /* avoid recursing into our current, parent, or state directories */
Lines 1490-1496 Link Here
1490
        dav_buffer_place_mem(pool, &fsctx->path1, dirent.name, len + 1, 0);
1494
        dav_buffer_place_mem(pool, &fsctx->path1, dirent.name, len + 1, 0);
1491
1495
1492
        status = apr_stat(&fsctx->info1.finfo, fsctx->path1.buf,
1496
        status = apr_stat(&fsctx->info1.finfo, fsctx->path1.buf,
1493
                          DAV_FINFO_MASK, pool);
1497
                          DAV_FINFO_MASK, subpool);
1494
        if (status != APR_SUCCESS && status != APR_INCOMPLETE) {
1498
        if (status != APR_SUCCESS && status != APR_INCOMPLETE) {
1495
            /* woah! where'd it go? */
1499
            /* woah! where'd it go? */
1496
            /* ### should have a better error here */
1500
            /* ### should have a better error here */
Lines 1562-1567 Link Here
1562
1566
1563
    /* ### check the return value of this? */
1567
    /* ### check the return value of this? */
1564
    apr_dir_close(dirp);
1568
    apr_dir_close(dirp);
1569
    apr_pool_destroy(subpool);
1570
    subpool = NULL;
1565
1571
1566
    if (err != NULL)
1572
    if (err != NULL)
1567
        return err;
1573
        return err;

Return to bug 48130