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

git version control git at videolan.org
Thu Jul 31 14:54:16 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Jul 31 14:57:28 2008 +0200| [b007760f41853126ff0e1d8a7329db38d581a3d8]

Stream out: fix memleak.

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

 modules/stream_out/standard.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index 09fa044..72b97e7 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -278,6 +278,7 @@ static int Open( vlc_object_t *p_this )
         else
         {
             msg_Err( p_stream, "no access _and_ no muxer (fatal error)" );
+            free( p_sys );
             return VLC_EGENERIC;
         }
     }
@@ -300,6 +301,7 @@ static int Open( vlc_object_t *p_this )
         else
         {
             msg_Err( p_stream, "no mux specified or found by extension" );
+            free( p_sys );
             return VLC_EGENERIC;
         }
     }
@@ -368,6 +370,7 @@ static int Open( vlc_object_t *p_this )
                  psz_access, psz_mux, psz_url );
         free( psz_access );
         free( psz_mux );
+        free( p_sys );
         return VLC_EGENERIC;
     }
     msg_Dbg( p_stream, "access opened" );
@@ -382,6 +385,7 @@ static int Open( vlc_object_t *p_this )
         sout_AccessOutDelete( p_access );
         free( psz_access );
         free( psz_mux );
+        free( p_sys );
         return VLC_EGENERIC;
     }
     msg_Dbg( p_stream, "mux opened" );




More information about the vlc-devel mailing list