[vlc-commits] libvlc: missing NULL terminator (fixes #13655)

Rémi Denis-Courmont git at videolan.org
Thu Jan 15 20:34:22 CET 2015


vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jan 15 21:32:27 2015 +0200| [60755cf35d3fea3cd4b4e71103449f9c1b789f82] | committer: Rémi Denis-Courmont

libvlc: missing NULL terminator (fixes #13655)

(cherry picked from commit 9d30c4c56a7bb37efc1121678b87e9595dd81675)

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

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

diff --git a/lib/audio.c b/lib/audio.c
index 15d9d98..c919eb2 100644
--- a/lib/audio.c
+++ b/lib/audio.c
@@ -146,7 +146,7 @@ libvlc_audio_output_device_enum( libvlc_media_player_t *mp )
     if( aout == NULL )
         return NULL;
 
-    libvlc_audio_output_device_t *list = NULL, **pp = &list;
+    libvlc_audio_output_device_t *list, **pp = &list;
     char **values, **texts;
 
     int n = aout_DevicesList( aout, &values, &texts );
@@ -173,6 +173,7 @@ libvlc_audio_output_device_enum( libvlc_media_player_t *mp )
     free( texts );
     free( values );
 err:
+    *pp = NULL;
     return list;
 }
 



More information about the vlc-commits mailing list