[vlc-devel] commit: leaks in case of http connection failure ( Sébastien Escudier )

git version control git at videolan.org
Tue Mar 31 17:44:08 CEST 2009


vlc | branch: master | Sébastien Escudier <sebastien-devel at celeos.eu> | Tue Mar 31 17:28:31 2009 +0200| [086a3600d6ba6fc7d9b44cbb42d37a5572102854] | committer: Rémi Denis-Courmont 

leaks in case of http connection failure

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

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

diff --git a/modules/access/http.c b/modules/access/http.c
index 77c6240..4b24ad3 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -583,6 +583,18 @@ error:
     free( p_sys->psz_user_agent );
 
     Disconnect( p_access );
+
+    if( p_sys->cookies )
+    {
+        int i;
+        for( i = 0; i < vlc_array_count( p_sys->cookies ); i++ )
+            free(vlc_array_item_at_index( p_sys->cookies, i ));
+        vlc_array_destroy( p_sys->cookies );
+    }
+
+#ifdef HAVE_ZLIB_H
+    inflateEnd( &p_sys->inflate.stream );
+#endif
     free( p_sys );
     return VLC_EGENERIC;
 }




More information about the vlc-devel mailing list