From 20e9f9bd769bcd10033fe3b70cfe257ff899893d Mon Sep 17 00:00:00 2001 From: Arshad Hussain Date: Sat, 31 May 2025 02:06:53 -0400 Subject: [PATCH] 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 --- lustre/utils/lustre_param.c | 1 + 1 file changed, 1 insertion(+) 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); -- 1.8.3.1