Ignore:
Timestamp:
2013-11-28T20:40:38Z (10 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1f63d9d
Parents:
532f53d
Message:

libext4: do not ignore error codes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/libext4_directory_index.c

    r532f53d re5a1ace3  
    527527               
    528528                /* Don't forget to put old block (prevent memory leak) */
    529                 block_put(p->block);
     529                rc = block_put(p->block);
     530                if (rc != EOK)
     531                        return rc;
    530532               
    531533                p->block = block;
     
    553555        /* Load direct block 0 (index root) */
    554556        uint32_t root_block_addr;
     557        int rc2;
    555558        int rc = ext4_filesystem_get_inode_data_block_index(inode_ref, 0,
    556559            &root_block_addr);
     
    620623               
    621624                /* Not found, leave untouched */
    622                 block_put(leaf_block);
     625                rc2 = block_put(leaf_block);
     626                if (rc2 != EOK)
     627                        goto cleanup;
    623628               
    624629                if (rc != ENOENT)
     
    628633                rc = ext4_directory_dx_next_block(inode_ref, hinfo.hash,
    629634                    dx_block, &dx_blocks[0]);
    630                 if (rc < 0)
     635                if (rc != EOK)
    631636                        goto cleanup;
     637
    632638        } while (rc == ENOENT);
    633639       
     
    640646       
    641647        while (tmp <= dx_block) {
    642                 block_put(tmp->block);
     648                rc2 = block_put(tmp->block);
     649                if (rc == EOK && rc2 != EOK)
     650                        rc = rc2;
    643651                ++tmp;
    644652        }
Note: See TracChangeset for help on using the changeset viewer.