From a9940d16fe5251f2f1d7cb008cfd3be1bfb50120 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 8 May 2017 17:10:25 +0100 Subject: [PATCH] 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 file changed, 1 insertion(+) diff --git a/daemons/dmfilemapd/dmfilemapd.c b/daemons/dmfilemapd/dmfilemapd.c index bbaabda4b..2637bd299 100644 --- a/daemons/dmfilemapd/dmfilemapd.c +++ b/daemons/dmfilemapd/dmfilemapd.c @@ -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;