lkml.org 
[lkml]   [2018]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH] dlm: NULL check before some freeing functions is not needed.
    From
    Date
    NULL check before some freeing functions is not needed.

    Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
    ---

    diff -u -p a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
    --- a/fs/dlm/lockspace.c
    +++ b/fs/dlm/lockspace.c
    @@ -681,8 +681,7 @@ static int new_lockspace(const char *nam
    out_lkbidr:
    idr_destroy(&ls->ls_lkbidr);
    for (i = 0; i < DLM_REMOVE_NAMES_MAX; i++) {
    - if (ls->ls_remove_names[i])
    - kfree(ls->ls_remove_names[i]);
    + kfree(ls->ls_remove_names[i]);
    }
    out_rsbtbl:
    vfree(ls->ls_rsbtbl);
    \
     
     \ /
      Last update: 2018-12-02 22:25    [W:2.690 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site