From: Michael Schuster Date: Tue, 14 Jul 2020 06:54:07 +0000 (+0200) Subject: macOS: Fix memory leak in FolderWatcherPrivate::startWatching X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~22^2~130^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5979ae30e159cc349885de6cc35788a11dce7ecc;p=nextcloud-desktop.git macOS: Fix memory leak in FolderWatcherPrivate::startWatching Signed-off-by: Michael Schuster --- diff --git a/src/gui/folderwatcher_mac.cpp b/src/gui/folderwatcher_mac.cpp index ee2314168..5a2c73c0d 100755 --- a/src/gui/folderwatcher_mac.cpp +++ b/src/gui/folderwatcher_mac.cpp @@ -100,6 +100,7 @@ void FolderWatcherPrivate::startWatching() kFSEventStreamCreateFlagUseCFTypes | kFSEventStreamCreateFlagFileEvents | kFSEventStreamCreateFlagIgnoreSelf); CFRelease(pathsToWatch); + CFRelease(folderCF); FSEventStreamScheduleWithRunLoop(_stream, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); FSEventStreamStart(_stream); }