[vlc-devel] [PATCH] fix memory leak in lib/audio.c
Quink
wantlamy at gmail.com
Mon Jun 8 18:45:01 CEST 2015
When one of item->psz_name and item->psz_description is not NULL, I think
there is
memory leak.
---
lib/audio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/audio.c b/lib/audio.c
index 4e0bacc..7901c64 100644
--- a/lib/audio.c
+++ b/lib/audio.c
@@ -86,6 +86,8 @@ libvlc_audio_output_t *
item->psz_description = strdup( module_get_name( module, true ) );
if( unlikely(item->psz_name == NULL || item->psz_description ==
NULL) )
{
+ free( item->psz_name );
+ free( item->psz_description );
free( item );
goto error;
}
--
1.9.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150609/98b9657e/attachment.html>
More information about the vlc-devel
mailing list