Fix a memory leak in the installer

This commit is contained in:
Lukhnos Liu 2018-11-20 21:30:29 -08:00
parent c5c7188a8e
commit 492f92d81f
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);
for (int i = 0; i < entryCount; i++) {
if (!strcmp(bundleAbsPath, bufs[i].f_mntfromname)) {
free(bufs);
return YES;
}
}
free(bufs);
return NO;
}