mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
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.
This commit is contained in:
parent
c5fee2ee6e
commit
a9940d16fe
@ -562,6 +562,7 @@ static int _filemap_monitor_check_file_unlinked(struct filemap_monitor *fm)
|
|||||||
ssize_t len;
|
ssize_t len;
|
||||||
|
|
||||||
fm->deleted = 0;
|
fm->deleted = 0;
|
||||||
|
same = 0;
|
||||||
|
|
||||||
if ((fd = open(fm->path, O_RDONLY)) < 0)
|
if ((fd = open(fm->path, O_RDONLY)) < 0)
|
||||||
goto check_unlinked;
|
goto check_unlinked;
|
||||||
|
Loading…
Reference in New Issue
Block a user