diff --git a/infer/src/pulse/PulseModels.ml b/infer/src/pulse/PulseModels.ml index dc97707f7..aa0a12b00 100644 --- a/infer/src/pulse/PulseModels.ml +++ b/infer/src/pulse/PulseModels.ml @@ -565,7 +565,7 @@ module ProcNameDispatcher = struct ; +PatternMatch.ObjectiveC.is_core_graphics_create_or_copy &++> ObjectiveC.alloc ; +PatternMatch.ObjectiveC.is_core_graphics_release <>$ capt_arg_payload $--> C.free ; -"CFRelease" <>$ capt_arg_payload $--> C.free - ; -"CFAutoRelease" <>$ capt_arg_payload $--> C.free ] + ; -"CFAutorelease" <>$ capt_arg_payload $--> C.free ] end let dispatch tenv proc_name args = ProcNameDispatcher.dispatch tenv proc_name args diff --git a/infer/tests/codetoanalyze/objc/pulse/MemoryLeaks.m b/infer/tests/codetoanalyze/objc/pulse/MemoryLeaks.m index 45c893a43..1811bd3c1 100644 --- a/infer/tests/codetoanalyze/objc/pulse/MemoryLeaks.m +++ b/infer/tests/codetoanalyze/objc/pulse/MemoryLeaks.m @@ -48,7 +48,7 @@ + (void)cg_bitmap_context_create_image1_no_leak_good { CGImageRef newImage = CGBitmapContextCreateImage(nil); - CFAutoRelease(newImage); + CFAutorelease(newImage); } @end