Whamcloud - gitweb
LU-15220 utils: fix gcc-11 -Werror=mismatched-dealloc error
authorJian Yu <yujian@whamcloud.com>
Fri, 21 Jan 2022 02:17:01 +0000 (18:17 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 22 Jan 2022 08:22:48 +0000 (08:22 +0000)
commite23b46aca3a5c0d5ebc1f3f56bc8d6abbcf46e4a
tree3801bbfd9c3606dc23737119107dbf13c50ed8c0
parentd3404cdeabf13ad7a8d8344851a87ad7ca95146b
LU-15220 utils: fix gcc-11 -Werror=mismatched-dealloc error

This patch fixes the following -Werror=mismatched-dealloc error in
lustre_rsync.c:

lustre_rsync.c: In function 'lr_locate_rsync':
lustre_rsync.c:1472:17: error: 'fclose' called on pointer returned
from a mismatched allocation function [-Werror=mismatched-dealloc]
 1472 |                 fclose(fp);
      |                 ^~~~~~~~~~
lustre_rsync.c:1467:14: note: returned from 'popen'
 1467 |         fp = popen(rsync, "r");
      |              ^~~~~~~~~~~~~~~~~

Test-Parameters: trivial testlist=lustre-rsync-test

Lustre-change: https://review.whamcloud.com/45814
Lustre-commit: 64ba2b18349b56c5d7ade944ea713bade84bc02e

Change-Id: I518db394a282c8e6123d878f63312bfb27c59235
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46248
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/utils/lustre_rsync.c