db/update/InotifyUpdate: fix use-after-free bug

Regression by commit 2d8847f428
This commit is contained in:
Max Kellermann
2021-10-28 13:39:12 +02:00
parent 72ba98c464
commit bfb1b641f9
2 changed files with 3 additions and 1 deletions

View File

@@ -282,7 +282,7 @@ InotifyUpdate::InotifyCallback(int wd, unsigned mask,
(mask & IN_ISDIR) != 0) {
/* a sub directory was changed: register those in
inotify */
const Path root_path = root->name;
const auto root_path = root->name;
const auto path_fs = uri_fs.IsNull()
? root_path