mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-31 20:52:53 +08:00
Fix memory leak of image data in imagePickerControllerReturnImageResult
A __bridge_retained cast increments the count and requires a CFRelease, this should just be __bridge a cast since it isn’t being held onto by this method. close #51
This commit is contained in:
parent
8b8db828f6
commit
0d389857cf
@ -632,7 +632,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
|
||||
CDVPluginResult* result = nil;
|
||||
|
||||
if (self.metadata) {
|
||||
CGImageSourceRef sourceImage = CGImageSourceCreateWithData((__bridge_retained CFDataRef)self.data, NULL);
|
||||
CGImageSourceRef sourceImage = CGImageSourceCreateWithData((__bridge CFDataRef)self.data, NULL);
|
||||
CFStringRef sourceType = CGImageSourceGetType(sourceImage);
|
||||
|
||||
CGImageDestinationRef destinationImage = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)self.data, sourceType, 1, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user