[vlc-devel] commit: Check the return value of malloc. ( Rémi Duraffort )
git version control
git at videolan.org
Mon Mar 3 13:28:27 CET 2008
vlc | branch: master | Rémi Duraffort <ivoire at via.ecp.fr> | Mon Mar 3 13:25:05 2008 +0100| [e0431bc0c10adc5d969d56194a43bb5546e55b79]
Check the return value of malloc.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e0431bc0c10adc5d969d56194a43bb5546e55b79
---
src/playlist/thread.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/playlist/thread.c b/src/playlist/thread.c
index fa65340..8d66901 100644
--- a/src/playlist/thread.c
+++ b/src/playlist/thread.c
@@ -62,6 +62,11 @@ void __playlist_ThreadCreate( vlc_object_t *p_parent )
// Stats
p_playlist->p_stats = (global_stats_t *)malloc( sizeof( global_stats_t ) );
+ if( !p_playlist->p_stats )
+ {
+ vlc_object_release( p_playlist );
+ return;
+ }
vlc_mutex_init( p_playlist, &p_playlist->p_stats->lock );
p_playlist->p_stats_computer = NULL;
More information about the vlc-devel
mailing list