[vlc-commits] smooth: fix potential memleak
Rémi Duraffort
git at videolan.org
Sat Dec 22 13:53:07 CET 2012
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Dec 22 13:49:57 2012 +0100| [7117284eb4b0515d45f0433c1210052226422cf5] | committer: Rémi Duraffort
smooth: fix potential memleak
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7117284eb4b0515d45f0433c1210052226422cf5
---
modules/stream_filter/smooth/downloader.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/modules/stream_filter/smooth/downloader.c b/modules/stream_filter/smooth/downloader.c
index 9d0f777..b5aee73 100644
--- a/modules/stream_filter/smooth/downloader.c
+++ b/modules/stream_filter/smooth/downloader.c
@@ -363,13 +363,12 @@ static chunk_t *build_init_chunk( stream_t *s )
if( !ret->data )
goto build_init_chunk_error;
- int res = build_smoo_box( s, ret->data );
- if( res != VLC_SUCCESS )
- goto build_init_chunk_error;
-
- return ret;
+ if( build_smoo_box( s, ret->data ) == VLC_SUCCESS)
+ return ret;
+ free( ret->data );
build_init_chunk_error:
+ free( ret );
msg_Err( s, "build_init_chunk failed" );
return NULL;
}
More information about the vlc-commits
mailing list