diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2017-11-28 11:04:29 -0500 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2017-11-28 11:04:29 -0500 |
commit | a4a7d12c06a58b666687941f6eefec99490f5180 (patch) | |
tree | 51deda0a16f44acb236785121a22013bef44475d | |
parent | 91eed5d64b7058f6b22d5138776e913fee593da7 (diff) | |
download | sdl_ios-a4a7d12c06a58b666687941f6eefec99490f5180.tar.gz |
Fix analyzer errorsfeature/carwindow
-rwxr-xr-x | SmartDeviceLink/SDLCarWindow.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/SmartDeviceLink/SDLCarWindow.m b/SmartDeviceLink/SDLCarWindow.m index 35cf8f6bd..537324ec6 100755 --- a/SmartDeviceLink/SDLCarWindow.m +++ b/SmartDeviceLink/SDLCarWindow.m @@ -174,6 +174,8 @@ NS_ASSUME_NONNULL_BEGIN CGImageDestinationRef destination = CGImageDestinationCreateWithData(imageData, kUTTypePNG, 1, NULL); CGImageDestinationAddImage(destination, imageRef, nil); if (!CGImageDestinationFinalize(destination)) { + CFRelease(imageData); + CFRelease(destination); return nil; } @@ -228,7 +230,6 @@ NS_ASSUME_NONNULL_BEGIN CGContextRestoreGState(context); UIImage* image = UIGraphicsGetImageFromCurrentImageContext(); - CGContextRelease(context); return image; } |