]> err.no Git - linux-2.6/blobdiff - fs/ext4/migrate.c
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
[linux-2.6] / fs / ext4 / migrate.c
index 8c6c685b9d22e1d399d34066e5e6a497150c81a9..5c1e27de7755b46552c3fd85dd11ad66d0ec1490 100644 (file)
@@ -43,6 +43,7 @@ static int finish_range(handle_t *handle, struct inode *inode,
 
        if (IS_ERR(path)) {
                retval = PTR_ERR(path);
+               path = NULL;
                goto err_out;
        }
 
@@ -74,6 +75,10 @@ static int finish_range(handle_t *handle, struct inode *inode,
        }
        retval = ext4_ext_insert_extent(handle, inode, path, &newext);
 err_out:
+       if (path) {
+               ext4_ext_drop_refs(path);
+               kfree(path);
+       }
        lb->first_pblock = 0;
        return retval;
 }