From e9edad6f8c8eb2ce3773775c4e2803dfffd544a0 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 28 May 2022 22:48:49 -0500 Subject: [PATCH] Fix surface leak if SDLVideo_CreateOverlay() fails --- app/streaming/video/slvid.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/app/streaming/video/slvid.cpp b/app/streaming/video/slvid.cpp index dab250be..d35b26a9 100644 --- a/app/streaming/video/slvid.cpp +++ b/app/streaming/video/slvid.cpp @@ -193,6 +193,7 @@ void SLVideoDecoder::notifyOverlayUpdated(Overlay::OverlayType type) if (m_Overlay == nullptr) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SLVideo_CreateOverlay() failed"); + SDL_FreeSurface(newSurface); return; }