Projects
openEuler:Mainline
SDL2
_service:tar_scm:CVE-2022-4743.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:CVE-2022-4743.patch of Package SDL2
From 00b67f55727bc0944c3266e2b875440da132ce4b Mon Sep 17 00:00:00 2001 From: zhailiangliang <zhailiangliang@loongson.cn> Date: Wed, 21 Sep 2022 10:30:38 +0800 Subject: [PATCH] Fix potential memory leak in GLES_CreateTexture --- src/render/opengles/SDL_render_gles.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/render/opengles/SDL_render_gles.c b/src/render/opengles/SDL_render_gles.c index a5fbab309eda..ba08a46e2805 100644 --- a/src/render/opengles/SDL_render_gles.c +++ b/src/render/opengles/SDL_render_gles.c @@ -359,6 +359,9 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) renderdata->glGenTextures(1, &data->texture); result = renderdata->glGetError(); if (result != GL_NO_ERROR) { + if (texture->access == SDL_TEXTUREACCESS_STREAMING) { + SDL_free(data->pixels); + } SDL_free(data); return GLES_SetError("glGenTextures()", result); } @@ -387,6 +390,9 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) result = renderdata->glGetError(); if (result != GL_NO_ERROR) { + if (texture->access == SDL_TEXTUREACCESS_STREAMING) { + SDL_free(data->pixels); + } SDL_free(data); return GLES_SetError("glTexImage2D()", result); }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2