[vlc-commits] input: fix memory leak if access is not found

Rémi Duraffort git at videolan.org
Sun Dec 15 22:03:30 CET 2013


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Dec 14 10:32:43 2013 +0100| [b4d33fe5dcdc522254bc41ca754a0175d2071103] | committer: Rémi Duraffort

input: fix memory leak if access is not found

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

 src/input/stream.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/input/stream.c b/src/input/stream.c
index 5788979..18e77e2 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -340,7 +340,10 @@ stream_t *stream_AccessNew( access_t *p_access, char **ppsz_list )
             access_t *p_tmp = access_New( p_access, p_access->p_input,
                                           p_access->psz_access, "", psz_name );
             if( !p_tmp )
+            {
+                free( psz_name );
                 continue;
+            }
 
             p_entry = malloc( sizeof(*p_entry) );
             if( p_entry )



More information about the vlc-commits mailing list