Merge git://git.denx.de/u-boot-fsl-qoriq
[oweals/u-boot.git] / fs / ext4 / ext4fs.c
index 7187dcfb0565566f0f778bd2191df7093a19a2e1..b0c7303aa410034fc6091a2a56d02f75def6936a 100644 (file)
@@ -71,7 +71,7 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos,
        blockcnt = lldiv(((len + pos) + blocksize - 1), blocksize);
 
        for (i = lldiv(pos, blocksize); i < blockcnt; i++) {
-               lbaint_t blknr;
+               long int blknr;
                int blockoff = pos - (blocksize * i);
                int blockend = blocksize;
                int skipfirst = 0;
@@ -167,6 +167,7 @@ int ext4fs_ls(const char *dirname)
                                  FILETYPE_DIRECTORY);
        if (status != 1) {
                printf("** Can not find directory. **\n");
+               ext4fs_free_node(dirnode, &ext4fs_root->diropen);
                return 1;
        }