From 90afac6a1272a8da373ce96079c13b7313e1c604 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Fri, 6 May 2011 17:08:56 +0300 Subject: [PATCH] --- yaml --- r: 250442 b: refs/heads/master c: eaeee242c531cd4b0a4a46e8b5dd7ef504380c42 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ubifs/sb.c | 3 ++- trunk/fs/ubifs/super.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) 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; }