mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-16 18:23:53 +01:00
[AltServer] Fixes memory leaks when installing apps
This commit is contained in:
@@ -125,6 +125,8 @@ NSNotificationName const ALTDeviceManagerDeviceDidDisconnectNotification = @"ALT
|
|||||||
int code = misagent_get_status_code(mis);
|
int code = misagent_get_status_code(mis);
|
||||||
NSLog(@"Failed to reinstall provisioning profile %@. (%@)", provisioningProfile.UUID, @(code));
|
NSLog(@"Failed to reinstall provisioning profile %@. (%@)", provisioningProfile.UUID, @(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plist_free(pdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
[[NSFileManager defaultManager] removeItemAtURL:removedProfilesDirectoryURL error:nil];
|
[[NSFileManager defaultManager] removeItemAtURL:removedProfilesDirectoryURL error:nil];
|
||||||
@@ -311,6 +313,8 @@ NSNotificationName const ALTDeviceManagerDeviceDidDisconnectNotification = @"ALT
|
|||||||
|
|
||||||
plist_t profiles = NULL;
|
plist_t profiles = NULL;
|
||||||
plist_from_xml(plistXML, plistLength, &profiles);
|
plist_from_xml(plistXML, plistLength, &profiles);
|
||||||
|
|
||||||
|
free(plistXML);
|
||||||
|
|
||||||
uint32_t profileCount = plist_array_get_size(profiles);
|
uint32_t profileCount = plist_array_get_size(profiles);
|
||||||
for (int i = 0; i < profileCount; i++)
|
for (int i = 0; i < profileCount; i++)
|
||||||
@@ -330,7 +334,7 @@ NSNotificationName const ALTDeviceManagerDeviceDidDisconnectNotification = @"ALT
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSData *data = [NSData dataWithBytes:(const void *)bytes length:length];
|
NSData *data = [NSData dataWithBytesNoCopy:bytes length:length freeWhenDone:YES];
|
||||||
ALTProvisioningProfile *provisioningProfile = [[ALTProvisioningProfile alloc] initWithData:data];
|
ALTProvisioningProfile *provisioningProfile = [[ALTProvisioningProfile alloc] initWithData:data];
|
||||||
|
|
||||||
if (![provisioningProfile isFreeProvisioningProfile])
|
if (![provisioningProfile isFreeProvisioningProfile])
|
||||||
|
|||||||
2
Dependencies/AltSign
vendored
2
Dependencies/AltSign
vendored
Submodule Dependencies/AltSign updated: 5f3d85cf24...4b43efed0d
Reference in New Issue
Block a user