[lkml]   [2011]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[13/89] UBIFS: fix memory leak on error path
    2.6.39-stable review patch.  If anyone has any objections, please let us know.


    From: Artem Bityutskiy <>

    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 <>
    Signed-off-by: Greg Kroah-Hartman <>

    fs/ubifs/journal.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/fs/ubifs/journal.c
    +++ b/fs/ubifs/journal.c
    @@ -666,6 +666,7 @@ out_free:

    release_head(c, BASEHD);
    + kfree(dent);
    ubifs_ro_mode(c, err);
    if (last_reference)

     \ /
      Last update: 2011-06-16 09:43    [W:0.019 / U:0.056 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site