1
0
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:
Bryn M. Reeves 2017-05-08 17:10:25 +01:00
parent c5fee2ee6e
commit a9940d16fe

View File

@ -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;