Whamcloud - gitweb
LU-15220 utils: fix gcc-11 -Werror=mismatched-dealloc error 14/45814/3
authorJian Yu <yujian@whamcloud.com>
Thu, 9 Dec 2021 19:18:13 +0000 (11:18 -0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 11 Jan 2022 06:19:11 +0000 (06:19 +0000)
commit64ba2b18349b56c5d7ade944ea713bade84bc02e
tree412b65ab1c8deb8aa25107977e19e7317f146c75
parentd527e812461baf9db2f6ed960a3b6cc12d4ab37c
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

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