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:
parent
ce74108099
commit
123e190ee3
@ -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 )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user