[vlc-commits] XCB/XVideo: fix memory leak

Rémi Denis-Courmont git at videolan.org
Tue Nov 1 18:23:15 CET 2011


vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov  1 19:22:36 2011 +0200| [059ec20607227190f1e2a91ab98b4f13046bebe7] | committer: Rémi Denis-Courmont

XCB/XVideo: fix memory leak

This was fixed VLC 1.2 in 8fdf5c8af8693274c03f1453b6be14ce0d5d1237.

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=059ec20607227190f1e2a91ab98b4f13046bebe7
---

 modules/video_output/xcb/xvideo.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index 4ad8bae..7687e1e 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -398,6 +398,7 @@ static int Open (vlc_object_t *obj)
                 continue; /* OMAP framebuffer sucks at YUV 4:2:0 */
             }
 
+            free (p_sys->att);
             xfmt = FindFormat (vd, chroma, &fmt, a->base_id, r, &p_sys->att);
             if (xfmt != NULL)
             {
@@ -414,6 +415,8 @@ static int Open (vlc_object_t *obj)
                 }
                 break;
             }
+            else
+                p_sys->att = NULL;
         }
         free (r);
         if (xfmt == NULL) /* No acceptable image formats */



More information about the vlc-commits mailing list