master - dmfilemapd: always initialise 'same' local variable (Coverity)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a9940d16fe5251f2f1d7cb008cfd3be1bfb50120 Commit: a9940d16fe5251f2f1d7cb008cfd3be1bfb50120 Parent: c5fee2ee6e483ee9e56d842f402d2de9dfe5151a Author: Bryn M. Reeves <[email protected]> AuthorDate: Mon May 8 17:10:25 2017 +0100 Committer: Bryn M. Reeves <[email protected]> CommitterDate: Mon May 8 17:10:25 2017 +0100
dmfilemapd: always initialise 'same' local variable (Coverity)
Fix a regression introduced in 70bb726 that allows a local variable in the monitored file checking routine to be accessed before its assignment when the file has already been unlinked.
--- daemons/dmfilemapd/dmfilemapd.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
daemons/dmfilemapd/dmfilemapd.c +1 -0
@@ -562,6 +562,7 @@ static int _filemap_monitor_check_file_unlinked(struct filemap_monitor *fm)ssize_t len; fm->deleted =0 ; + same =0 ;if ((fd =open (fm->path,O_RDONLY )) <0 ) goto check_unlinked;