]> git.sesse.net Git - vlc/blobdiff - src/input/vlmshell.c
input_DecoderCreate: missing const
[vlc] / src / input / vlmshell.c
index 33287ac214794cad6677bc9aa173e2b5e9077ca8..9c254347f3454c925a53e89c59a43f56d0a5ed94 100644 (file)
@@ -602,7 +602,7 @@ static int ExecuteScheduleProperty( vlm_t *p_vlm, vlm_schedule_sys_t *p_schedule
             if( ++i >= i_property )
                 break;
 
-            psz_line = strdup( ppsz_property[i] );
+            psz_line = xstrdup( ppsz_property[i] );
             for( j = i+1; j < i_property; j++ )
             {
                 psz_line = xrealloc( psz_line,
@@ -611,7 +611,9 @@ static int ExecuteScheduleProperty( vlm_t *p_vlm, vlm_schedule_sys_t *p_schedule
                 strcat( psz_line, ppsz_property[j] );
             }
 
-            if( vlm_ScheduleSetup( p_schedule, "append", psz_line ) )
+            int val = vlm_ScheduleSetup( p_schedule, "append", psz_line );
+            free( psz_line );
+            if( val )
                 goto error;
             break;
         }
@@ -854,8 +856,8 @@ int ExecuteCommand( vlm_t *p_vlm, const char *psz_command,
 
     if( !psz_buf || !ppsz_command )
     {
-        p_message = vlm_MessageNew( ( ppsz_command ) ? ppsz_command[0] : NULL,
-                        "Memory allocation failed for command of length %zu",
+        p_message = vlm_MessageNew( "Memory error",
+                        "allocation failed for command of length %zu",
                         i_command_len );
         goto error;
     }