Remove the branch that free res->lockname.name because the condition
is never satisfied when jump to label error.
Signed-off-by: joyce.xue <xuejiufei@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
        return res;
 
 error:
-       if (res && res->lockname.name)
-               kmem_cache_free(dlm_lockname_cache, (void *)res->lockname.name);
-
        if (res)
                kmem_cache_free(dlm_lockres_cache, res);
        return NULL;