summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2017-11-28 11:04:29 -0500
committerJoel Fischer <joeljfischer@gmail.com>2017-11-28 11:04:29 -0500
commita4a7d12c06a58b666687941f6eefec99490f5180 (patch)
tree51deda0a16f44acb236785121a22013bef44475d
parent91eed5d64b7058f6b22d5138776e913fee593da7 (diff)
downloadsdl_ios-a4a7d12c06a58b666687941f6eefec99490f5180.tar.gz
Fix analyzer errorsfeature/carwindow
-rwxr-xr-xSmartDeviceLink/SDLCarWindow.m3
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;
}