From: Timothy Day Date: Tue, 3 Oct 2023 16:06:18 +0000 (+0000) Subject: LU-16518 rsync: fix new clang error in lustre_rsync.c X-Git-Tag: 2.15.59~19 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F65%2F52565%2F3;p=fs%2Flustre-release.git LU-16518 rsync: fix new clang error in lustre_c If we bail out of the function early, changelog_priv may not be initialized when we check it during the cleanup code. Initialize changelog_priv to NULL to avoid this. Fixes: 4fc99832 ("LU-17000 coverity: Fix Resource Leak(1)") Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: Ide0430284b18f085e421cdea677ea14e0a4bac14 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52565 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger Reviewed-by: Arshad Hussain --- diff --git a/lustre/utils/lustre_rsync.c b/lustre/utils/lustre_rsync.c index f1c9a00..07e8eea 100644 --- a/lustre/utils/lustre_rsync.c +++ b/lustre/utils/lustre_rsync.c @@ -1544,7 +1544,7 @@ void lr_print_failure(struct lr_info *info, int rc) /* Replicate filesystem operations from src_path to target_path */ int lr_replicate(void) { - void *changelog_priv; + void *changelog_priv = NULL; struct lr_info *info; struct lr_info *ext = NULL; time_t start;