[vlc-commits] se/archive: prevent potential call to archive_{entry, read}_free with NULL
Filip Roséen
git at videolan.org
Fri Mar 17 19:05:42 CET 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Fri Mar 17 11:26:30 2017 +0100| [ffe9e01b945f6ffa12dbf544ab398515fbdb5df7] | committer: Jean-Baptiste Kempf
se/archive: prevent potential call to archive_{entry, read}_free with NULL
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ffe9e01b945f6ffa12dbf544ab398515fbdb5df7
---
modules/stream_extractor/archive.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/stream_extractor/archive.c b/modules/stream_extractor/archive.c
index 7a4e5e1..b2bf4f9 100644
--- a/modules/stream_extractor/archive.c
+++ b/modules/stream_extractor/archive.c
@@ -322,8 +322,11 @@ static int archive_clean( private_sys_t* p_sys )
{
libarchive_t* p_arc = p_sys->p_archive;
- archive_entry_free( p_sys->p_entry );
- archive_read_free( p_arc );
+ if( p_sys->p_entry )
+ archive_entry_free( p_sys->p_entry );
+
+ if( p_arc )
+ archive_read_free( p_arc );
p_sys->p_entry = NULL;
p_sys->p_archive = NULL;
More information about the vlc-commits
mailing list