vlc | branch: master | Niklas Haas <[email protected]> | Fri Oct 5 21:07:51 2018 +0200| [2f90ab90ad3bf8e47caadbbbd8177582162a3c6c] | committer: Thomas Guillem
opengl: fix memory leak in obscure PBO failure case This basically doesn't happen in practice, but we should correctly free the picture even in this failure path. Signed-off-by: Thomas Guillem <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2f90ab90ad3bf8e47caadbbbd8177582162a3c6c --- modules/video_output/opengl/converter_sw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/video_output/opengl/converter_sw.c b/modules/video_output/opengl/converter_sw.c index 4a839079b3..6338a1a5c0 100644 --- a/modules/video_output/opengl/converter_sw.c +++ b/modules/video_output/opengl/converter_sw.c @@ -156,7 +156,10 @@ pbo_picture_create(const opengl_tex_converter_t *tc, bool direct_rendering) if( p->i_pitch < 0 || p->i_lines <= 0 || (size_t)p->i_pitch > SIZE_MAX/p->i_lines ) + { + picture_Release(pic); return NULL; + } picsys->bytes[i] = (p->i_pitch * p->i_lines) + 15 / 16 * 16; } return pic; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
