| Summary: | CreateCGImageSourceFromRWops leaks | ||
|---|---|---|---|
| Product: | SDL_image | Reporter: | Mike <michrublev> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | ||
| Version: | 1.2.10 | ||
| Hardware: | x86_64 | ||
| OS: | Mac OS X 10.6 | ||
| Attachments: |
Test program
valgrind logfile - on current (1.2.10) version valgrind logfile for patched libSDL_image |
||
Created attachment 634 [details]
valgrind logfile - on current (1.2.10) version
Created attachment 635 [details]
valgrind logfile for patched libSDL_image
Fixed, thanks! http://hg.libsdl.org/SDL_image/rev/ec183abd5996 |
Created attachment 633 [details] Test program CGDataProviderRef must be cleaned after usage. Here is a proposed patch: {{{ diff -r b1c1ec3a8d49 IMG_ImageIO.c --- a/IMG_ImageIO.c Thu Apr 07 07:50:52 2011 -0700 +++ b/IMG_ImageIO.c Fri Jun 24 13:45:18 2011 +0700 @@ -103,6 +103,7 @@ // Get the CGImageSourceRef. // The dictionary can be NULL or contain hints to help ImageIO figure out the image type. source_ref = CGImageSourceCreateWithDataProvider(data_provider, hints_and_options); + CGDataProviderRelease(data_provider); return source_ref; } }}} Attached are test program and valgrind's logfiles