1
mirror of https://code.videolan.org/videolan/vlc synced 2024-10-03 01:31:53 +02:00

lua: PushCommand: Check for allocation failure

This commit is contained in:
Hugo Beauzée-Luyssen 2017-03-28 16:04:05 +02:00
parent ce74108099
commit 123e190ee3

View File

@ -230,6 +230,8 @@ int PushCommand__( extension_t *p_ext, bool b_unique, command_type_e i_command,
{
/* Create command */
struct command_t *cmd = calloc( 1, sizeof( struct command_t ) );
if( unlikely( cmd == NULL ) )
return VLC_ENOMEM;
cmd->i_command = i_command;
switch( i_command )
{