[cfe-commits] r50219 - /cfe/trunk/test/Analysis-Apple/NSString.m
Fariborz Jahanian
fjahanian at apple.com
Thu Apr 24 11:39:01 PDT 2008
On Apr 24, 2008, at 11:17 AM, Ted Kremenek wrote:
>
> +
> +NSString* f7(NSString* s1, NSString* s2, NSString* s3) {
> +
> + NSString* s4 = CFStringCreateWithFormat(kCFAllocatorDefault, NULL,
> + L"%@ %@ (%@)",
> + s1, s2, s3);
> +
> + CFRetain(s4);
> + return s4; // expected-warning{{leak}}
Why does this constitute a leak? If caller releases it, everything
would be fine.
- Fariborz
>
> +}
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list