diff options
| author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-05-31 08:40:40 +0300 |
|---|---|---|
| committer | Andi Kleen <ak@linux.intel.com> | 2011-08-01 13:54:54 -0700 |
| commit | 26543e37c91d678a14a2fcc6795f26f240bcad82 (patch) | |
| tree | bf50664c0643e4c250f99c0b7a0a6bc509534315 /fs | |
| parent | 6093240b06916ca21216bb4728f79b264fd08e30 (diff) | |
UBIFS: fix memory leak on error path
commit 812eb258311f89bcd664a34a620f249d54a2cd83 upstream.
UBIFS leaks memory on error path in 'ubifs_jnl_update()' in case of write
failure because it forgets to free the 'struct ubifs_dent_node *dent' object.
Although the object is small, the alignment can make it large - e.g., 2KiB
if the min. I/O unit is 2KiB.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/ubifs/journal.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c index d321baeca68d..841f77cc93cf 100644 --- a/fs/ubifs/journal.c +++ b/fs/ubifs/journal.c @@ -665,6 +665,7 @@ out_free: out_release: release_head(c, BASEHD); + kfree(dent); out_ro: ubifs_ro_mode(c, err); if (last_reference) |
