orangefs: fix memory leak of string 'new' on exit path
authorColin Ian King <colin.king@canonical.com>
Fri, 2 Dec 2016 15:18:06 +0000 (15:18 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Apr 2017 05:11:46 +0000 (07:11 +0200)
commitdcac0d18e7e1ee4ae524ae9c672a35b86189a260
tree83539655629227cda722a2d778cec3e1988b9bc5
parent17fda94d181c75d95dc9ab3db39813a0efeccafb
orangefs: fix memory leak of string 'new' on exit path

commit 4defb5f912a0ba60e07e91a4b62634814cd99b7f upstream.

allocates string 'new' is not free'd on the exit path when
cdm_element_count <= 0. Fix this by kfree'ing it.

Fixes CoverityScan CID#1375923 "Resource Leak"

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/orangefs/orangefs-debugfs.c