[win32] WinRenderer: Fix possible memory leak.
authorAnton Fedchin <afedchin@ruswizards.com>
Mon, 11 May 2015 05:23:49 +0000 (08:23 +0300)
committerAnton Fedchin <afedchin@ruswizards.com>
Mon, 11 May 2015 05:23:49 +0000 (08:23 +0300)
xbmc/cores/VideoRenderers/WinRenderer.cpp

index 949143d..098f55f 100644 (file)
@@ -1208,6 +1208,7 @@ bool CWinRenderer::CreateYV12Texture(int index)
     if (!buf->Create(m_format, m_sourceWidth, m_sourceHeight))
     {
       CLog::Log(LOGERROR, __FUNCTION__" - Unable to create YV12 video texture %i", index);
+      delete buf;
       return false;
     }
     m_VideoBuffers[index] = buf;