macOS: Fix memory leak in FolderWatcherPrivate::startWatching

Signed-off-by: Michael Schuster <michael@schuster.ms>
This commit is contained in:
Michael Schuster 2020-07-14 08:54:07 +02:00 committed by Michael Schuster (Rebase PR Action)
parent 4b985ab3b3
commit 5979ae30e1

View file

@ -100,6 +100,7 @@ void FolderWatcherPrivate::startWatching()
kFSEventStreamCreateFlagUseCFTypes | kFSEventStreamCreateFlagFileEvents | kFSEventStreamCreateFlagIgnoreSelf);
CFRelease(pathsToWatch);
CFRelease(folderCF);
FSEventStreamScheduleWithRunLoop(_stream, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
FSEventStreamStart(_stream);
}