FreeBSD Bugzilla – Attachment 186945 Details for
Bug 222822
devel/sdl20: Fix bugs in SDL_FreeSurface function after 2.0.6 update
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch (since 450461 revision)
sdl20.diff (text/plain), 1.49 KB, created by
lightside
on 2017-10-06 11:03:42 UTC
(
hide
)
Description:
Proposed patch (since 450461 revision)
Filename:
MIME Type:
Creator:
lightside
Created:
2017-10-06 11:03:42 UTC
Size:
1.49 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 451359) >+++ Makefile (working copy) >@@ -2,6 +2,7 @@ > > PORTNAME= sdl2 > PORTVERSION= 2.0.6 >+PORTREVISION= 1 > CATEGORIES= devel > MASTER_SITES= http://www.libsdl.org/release/ > DISTNAME= SDL2-${PORTVERSION} >Index: files/patch-src_video_SDL__surface.c >=================================================================== >--- files/patch-src_video_SDL__surface.c (nonexistent) >+++ files/patch-src_video_SDL__surface.c (working copy) >@@ -0,0 +1,31 @@ >+# Origin: https://hg.libsdl.org/SDL/rev/a09c3f87a12f >+# Subject: Fixed bug 3852 - SDL_FreeSurface deallocates surface->map even if >+# the surface is not yet freed >+# Origin: https://hg.libsdl.org/SDL/rev/3a23ca106752 >+# Subject: Fixed bug 3855 - Memory leak in SDL_FreeSurface >+ >+--- src/video/SDL_surface.c.orig 2017-09-22 18:51:01 UTC >++++ src/video/SDL_surface.c >+@@ -1198,10 +1198,8 @@ SDL_FreeSurface(SDL_Surface * surface) >+ if (surface->flags & SDL_DONTFREE) { >+ return; >+ } >+- if (surface->map != NULL) { >+- SDL_FreeBlitMap(surface->map); >+- surface->map = NULL; >+- } >++ SDL_InvalidateMap(surface->map); >++ >+ if (--surface->refcount > 0) { >+ return; >+ } >+@@ -1219,6 +1217,9 @@ SDL_FreeSurface(SDL_Surface * surface) >+ if (!(surface->flags & SDL_PREALLOC)) { >+ SDL_free(surface->pixels); >+ } >++ if (surface->map) { >++ SDL_FreeBlitMap(surface->map); >++ } >+ SDL_free(surface); >+ } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 222822
: 186945