[vlc-devel] commit: v4l2: fix memleak. ( Rémi Duraffort )

git version control git at videolan.org
Wed May 20 18:53:57 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue May 19 23:27:07 2009 +0200| [cd82402612fc60f41874b00072557515fbe5ee48] | committer: Rémi Duraffort 

v4l2: fix memleak.

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

 modules/access/v4l2.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c
index c52fa87..31dae66 100644
--- a/modules/access/v4l2.c
+++ b/modules/access/v4l2.c
@@ -2913,6 +2913,7 @@ static void SetAvailControlsByString( vlc_object_t *p_obj, demux_sys_t *p_sys,
                 Control( p_obj, p_sys, i_fd, psz_name, i_cid,
                          strtol( ++psz_assign, &psz_parser, 0) );
             }
+            free( name.psz_string );
         }
 
         if( psz_parser < psz_assign )
@@ -2923,6 +2924,7 @@ static void SetAvailControlsByString( vlc_object_t *p_obj, demux_sys_t *p_sys,
             psz_parser = ( *psz_delim ) ? ( psz_delim + 1 ) : psz_delim;
         }
     }
+    var_Change( p_obj, "allcontrols", VLC_VAR_FREELIST, &val, &text );
 }
 
 /*****************************************************************************




More information about the vlc-devel mailing list