From 1ca73fe794e7fde998df6ae1470bab5f4b4c8a0f Mon Sep 17 00:00:00 2001 From: Lukhnos Liu Date: Tue, 20 Nov 2018 21:30:29 -0800 Subject: [PATCH] Fix a memory leak in the installer --- Source/Installer/AppDelegate.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Installer/AppDelegate.m b/Source/Installer/AppDelegate.m index 6a327950..f058f5ab 100644 --- a/Source/Installer/AppDelegate.m +++ b/Source/Installer/AppDelegate.m @@ -202,9 +202,11 @@ static const NSTimeInterval kTranslocationRemovalDeadline = 60.0; entryCount = getfsstat(bufs, entryCount * entrySize, MNT_NOWAIT); for (int i = 0; i < entryCount; i++) { if (!strcmp(bundleAbsPath, bufs[i].f_mntfromname)) { + free(bufs); return YES; } } + free(bufs); return NO; }