[vlc-commits] input: check malloc return
Jean-Baptiste Kempf
git at videolan.org
Tue Apr 28 15:11:39 CEST 2015
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Apr 28 15:09:57 2015 +0200| [46437d4aa3300b99dbfe29f6f2d1fa8fcf64155d] | committer: Jean-Baptiste Kempf
input: check malloc return
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=46437d4aa3300b99dbfe29f6f2d1fa8fcf64155d
---
include/vlc_input.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/vlc_input.h b/include/vlc_input.h
index 5b05ce8..bb478e8 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -53,6 +53,8 @@ struct seekpoint_t
static inline seekpoint_t *vlc_seekpoint_New( void )
{
seekpoint_t *point = (seekpoint_t*)malloc( sizeof( seekpoint_t ) );
+ if( !point )
+ return NULL;
point->i_byte_offset =
point->i_time_offset = -1;
point->psz_name = NULL;
@@ -96,6 +98,8 @@ typedef struct input_title_t
static inline input_title_t *vlc_input_title_New(void)
{
input_title_t *t = (input_title_t*)malloc( sizeof( input_title_t ) );
+ if( !t )
+ return NULL;
t->psz_name = NULL;
t->b_menu = false;
More information about the vlc-commits
mailing list