Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
[linux-2.6-microblaze.git] / fs / ubifs / orphan.c
index 2c29408..4909321 100644 (file)
@@ -173,6 +173,7 @@ int ubifs_add_orphan(struct ubifs_info *c, ino_t inum)
                        err = PTR_ERR(xent);
                        if (err == -ENOENT)
                                break;
+                       kfree(pxent);
                        return err;
                }
 
@@ -182,6 +183,7 @@ int ubifs_add_orphan(struct ubifs_info *c, ino_t inum)
 
                xattr_orphan = orphan_add(c, xattr_inum, orphan);
                if (IS_ERR(xattr_orphan)) {
+                       kfree(pxent);
                        kfree(xent);
                        return PTR_ERR(xattr_orphan);
                }
@@ -644,7 +646,8 @@ static int do_kill_orphans(struct ubifs_info *c, struct ubifs_scan_leb *sleb,
                if (snod->type != UBIFS_ORPH_NODE) {
                        ubifs_err(c, "invalid node type %d in orphan area at %d:%d",
                                  snod->type, sleb->lnum, snod->offs);
-                       ubifs_dump_node(c, snod->node);
+                       ubifs_dump_node(c, snod->node,
+                                       c->leb_size - snod->offs);
                        err = -EINVAL;
                        goto out_free;
                }
@@ -672,7 +675,8 @@ static int do_kill_orphans(struct ubifs_info *c, struct ubifs_scan_leb *sleb,
                        if (!first) {
                                ubifs_err(c, "out of order commit number %llu in orphan node at %d:%d",
                                          cmt_no, sleb->lnum, snod->offs);
-                               ubifs_dump_node(c, snod->node);
+                               ubifs_dump_node(c, snod->node,
+                                               c->leb_size - snod->offs);
                                err = -EINVAL;
                                goto out_free;
                        }