summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext2fs/xattr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext2fs/xattr.c b/ext2fs/xattr.c
index c5771fe0..13668845 100644
--- a/ext2fs/xattr.c
+++ b/ext2fs/xattr.c
@@ -867,6 +867,10 @@ ext2_set_xattr (struct node *np, const char *name, const char *value,
cleanup:
if (block)
disk_cache_block_deref (block);
+ if (ei->i_file_acl == 0 && blkno != 0)
+ /* We allocated a block, but for some reason we did not register
+ it. */
+ ext2_free_blocks (blkno, 1);
dino_deref (ei);
return err;