diff --git a/[refs] b/[refs] index 21eefede2fa0..7b0fb259c4bb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c1f1f91d2183b91c684900b529b6c336ad3dd27c +refs/heads/master: eaeee242c531cd4b0a4a46e8b5dd7ef504380c42 diff --git a/trunk/fs/ubifs/sb.c b/trunk/fs/ubifs/sb.c index bf31b4729e51..cad60b51f7c4 100644 --- a/trunk/fs/ubifs/sb.c +++ b/trunk/fs/ubifs/sb.c @@ -475,7 +475,8 @@ static int validate_sb(struct ubifs_info *c, struct ubifs_sb_node *sup) * @c: UBIFS file-system description object * * This function returns a pointer to the superblock node or a negative error - * code. + * code. Note, the user of this function is responsible of kfree()'ing the + * returned superblock buffer. */ struct ubifs_sb_node *ubifs_read_sb_node(struct ubifs_info *c) { diff --git a/trunk/fs/ubifs/super.c b/trunk/fs/ubifs/super.c index 407c064fb1c1..575ea8353d08 100644 --- a/trunk/fs/ubifs/super.c +++ b/trunk/fs/ubifs/super.c @@ -1585,6 +1585,7 @@ static int ubifs_remount_rw(struct ubifs_info *c) } sup->leb_cnt = cpu_to_le32(c->leb_cnt); err = ubifs_write_sb_node(c, sup); + kfree(sup); if (err) goto out; }