Fix double (or up to 2^sizeof(int) times)
authorRafaël Carré <funman@videolan.org>
Fri, 30 May 2008 11:12:02 +0000 (13:12 +0200)
committerRafaël Carré <funman@videolan.org>
Fri, 30 May 2008 11:12:12 +0000 (13:12 +0200)
Reported by Coverity scan : CID 142

src/input/stream.c

index 94ec224..6bc645a 100644 (file)
@@ -448,10 +448,11 @@ static void AStreamDestroy( stream_t *s )
     {
         free( p_sys->list[p_sys->i_list]->psz_path );
         free( p_sys->list[p_sys->i_list] );
-        free( p_sys->list );
     }
 
-    free( s->p_sys );
+    free( p_sys->list );
+    free( p_sys );
+
     vlc_object_release( s );
 }