Commit 123e190e authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

lua: PushCommand: Check for allocation failure

parent ce741080
......@@ -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 )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment