Commit 8efb3b63 authored by Rémi Duraffort's avatar Rémi Duraffort

vlm: reduce deletion complexity and help analyzers

parent 0781db04
...@@ -990,18 +990,17 @@ static vlm_schedule_sys_t *vlm_ScheduleNew( vlm_t *vlm, const char *psz_name ) ...@@ -990,18 +990,17 @@ static vlm_schedule_sys_t *vlm_ScheduleNew( vlm_t *vlm, const char *psz_name )
/* for now, simple delete. After, del with options (last arg) */ /* for now, simple delete. After, del with options (last arg) */
void vlm_ScheduleDelete( vlm_t *vlm, vlm_schedule_sys_t *sched ) void vlm_ScheduleDelete( vlm_t *vlm, vlm_schedule_sys_t *sched )
{ {
int i;
if( sched == NULL ) return; if( sched == NULL ) return;
TAB_REMOVE( vlm->i_schedule, vlm->schedule, sched ); TAB_REMOVE( vlm->i_schedule, vlm->schedule, sched );
if( vlm->i_schedule == 0 ) free( vlm->schedule ); if( vlm->i_schedule == 0 ) free( vlm->schedule );
free( sched->psz_name ); free( sched->psz_name );
while( sched->i_command )
{ for ( i = 0; i < sched->i_command; i++ )
char *psz_cmd = sched->command[0]; free( sched->command[i] );
TAB_REMOVE( sched->i_command, sched->command, psz_cmd ); free( sched->command );
free( psz_cmd );
}
free( sched ); free( sched );
} }
......
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