[vlc-commits] fix memory leak in lib/audio.c

Zhao Zhili git at videolan.org
Sun Jun 14 19:04:31 CEST 2015


vlc/vlc-2.2 | branch: master | Zhao Zhili <wantlamy at gmail.com> | Wed Jun 10 18:44:12 2015 +0300| [8eae3df54d45cda1490bf1f0271d699ff4802c6d] | committer: Jean-Baptiste Kempf

fix memory leak in lib/audio.c

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
(cherry picked from commit 29ed29e64272787e5ee37a76f3ff68a532607c9c)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=8eae3df54d45cda1490bf1f0271d699ff4802c6d
---

 lib/audio.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/audio.c b/lib/audio.c
index c919eb2..13378ff 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;
         }



More information about the vlc-commits mailing list