From: Arshad Hussain Date: Sat, 31 May 2025 06:06:53 +0000 (-0400) Subject: LU-17000 obdclass: Fix mem leak in lcfg_setparam_client X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F99%2F59499%2F2;p=fs%2Flustre-release.git LU-17000 obdclass: Fix mem leak in lcfg_setparam_client if call to llapi_param_get_paths() fails. tmp_path is left unfreed. Test-Parameters: trivial CoverityID: 457066 ("Resource leak") Fixes: 10a04e32 (LU-16724 ptlrpc: refactor page pools patch 3) Signed-off-by: Arshad Hussain Change-Id: Ib8962675fcb06a4d6b1539340f4a005dd65b7e02 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59499 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Timothy Day Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/lustre_param.c b/lustre/utils/lustre_param.c index 6b43814..926a156 100644 --- a/lustre/utils/lustre_param.c +++ b/lustre/utils/lustre_param.c @@ -1604,6 +1604,7 @@ static int lcfg_setparam_client(char *func, char *buf, struct param_opts *popt) fprintf(stderr, "error: %s: client: param_paths '%s': %s\n", jt_cmdname(func), param_name, strerror(errno)); + free(tmp_path); goto out; } free(tmp_path);