[vlc-devel] commit: Remove memleak in input_ItemAddInfo ( check correctly vasprintf return value). ( Rémi Duraffort )

git version control git at videolan.org
Thu Jul 31 09:04:22 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Jul 31 09:06:04 2008 +0200| [b99613a3e91faf43a090c46176c046a5844ef820]

Remove memleak in input_ItemAddInfo (check correctly vasprintf return value).

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

 src/input/item.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/input/item.c b/src/input/item.c
index 793ca3a..27f7a09 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -295,7 +295,7 @@ int input_ItemAddInfo( input_item_t *p_i,
     }
 
     va_start( args, psz_format );
-    if( vasprintf( &p_info->psz_value, psz_format, args) )
+    if( vasprintf( &p_info->psz_value, psz_format, args) == -1 )
         p_info->psz_value = NULL;
     va_end( args );
 




More information about the vlc-devel mailing list