diff --git a/AltServer/Devices/ALTDeviceManager.mm b/AltServer/Devices/ALTDeviceManager.mm index 204c4c97..24420458 100644 --- a/AltServer/Devices/ALTDeviceManager.mm +++ b/AltServer/Devices/ALTDeviceManager.mm @@ -125,6 +125,8 @@ NSNotificationName const ALTDeviceManagerDeviceDidDisconnectNotification = @"ALT int code = misagent_get_status_code(mis); NSLog(@"Failed to reinstall provisioning profile %@. (%@)", provisioningProfile.UUID, @(code)); } + + plist_free(pdata); } [[NSFileManager defaultManager] removeItemAtURL:removedProfilesDirectoryURL error:nil]; @@ -311,6 +313,8 @@ NSNotificationName const ALTDeviceManagerDeviceDidDisconnectNotification = @"ALT plist_t profiles = NULL; plist_from_xml(plistXML, plistLength, &profiles); + + free(plistXML); uint32_t profileCount = plist_array_get_size(profiles); for (int i = 0; i < profileCount; i++) @@ -330,7 +334,7 @@ NSNotificationName const ALTDeviceManagerDeviceDidDisconnectNotification = @"ALT 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]; if (![provisioningProfile isFreeProvisioningProfile]) diff --git a/Dependencies/AltSign b/Dependencies/AltSign index 5f3d85cf..4b43efed 160000 --- a/Dependencies/AltSign +++ b/Dependencies/AltSign @@ -1 +1 @@ -Subproject commit 5f3d85cf2419e55210f1f349bc15436d91fb0087 +Subproject commit 4b43efed0d676fa016b26d136fa990ea8126f821