Fix a memory leak in the installer

This commit is contained in:
Lukhnos Liu 2018-11-20 21:30:29 -08:00
parent 14c2e70f7b
commit 1ca73fe794
1 changed files with 2 additions and 0 deletions

View File

@ -202,9 +202,11 @@ static const NSTimeInterval kTranslocationRemovalDeadline = 60.0;
entryCount = getfsstat(bufs, entryCount * entrySize, MNT_NOWAIT); entryCount = getfsstat(bufs, entryCount * entrySize, MNT_NOWAIT);
for (int i = 0; i < entryCount; i++) { for (int i = 0; i < entryCount; i++) {
if (!strcmp(bundleAbsPath, bufs[i].f_mntfromname)) { if (!strcmp(bundleAbsPath, bufs[i].f_mntfromname)) {
free(bufs);
return YES; return YES;
} }
} }
free(bufs);
return NO; return NO;
} }