fix memory leak of image_source in createCachedImageFromAuto
fix potential null dereference of NSError **error
update null dereference fix to not affect return value
fix memory leak, CGColorRef not released
fix potential null dereference (when NSError**error == nil)
fix potential null dereference (outMask may be null)
fix memory leak in ThoMo (not releasing retained services references - Note: ThoMo is compiled with ARC disabled)