Skip to content

Commit

Permalink
vlm: reduce deletion complexity and help analyzers
Browse files Browse the repository at this point in the history
  • Loading branch information
ivoire committed Jan 2, 2014
1 parent 0781db0 commit 8efb3b6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/input/vlmshell.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
void vlm_ScheduleDelete( vlm_t *vlm, vlm_schedule_sys_t *sched )
{
int i;
if( sched == NULL ) return;

TAB_REMOVE( vlm->i_schedule, vlm->schedule, sched );

if( vlm->i_schedule == 0 ) free( vlm->schedule );
free( sched->psz_name );
while( sched->i_command )
{
char *psz_cmd = sched->command[0];
TAB_REMOVE( sched->i_command, sched->command, psz_cmd );
free( psz_cmd );
}

for ( i = 0; i < sched->i_command; i++ )
free( sched->command[i] );
free( sched->command );
free( sched );
}

Expand Down

0 comments on commit 8efb3b6

Please sign in to comment.