Commit 56cd4c09 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix memory leak (CID 95)

parent c50a5d13
...@@ -1368,17 +1368,12 @@ static int64_t vlm_Date( void ) ...@@ -1368,17 +1368,12 @@ static int64_t vlm_Date( void )
vlm_schedule_t *vlm_ScheduleNew( vlm_t *vlm, const char *psz_name ) vlm_schedule_t *vlm_ScheduleNew( vlm_t *vlm, const char *psz_name )
{ {
vlm_schedule_t *p_sched = malloc( sizeof( vlm_schedule_t ) ); if( !psz_name )
if( !p_sched )
{
return NULL; return NULL;
}
if( !psz_name ) vlm_schedule_t *p_sched = malloc( sizeof( vlm_schedule_t ) );
{ if( !p_sched )
return NULL; return NULL;
}
p_sched->psz_name = strdup( psz_name ); p_sched->psz_name = strdup( psz_name );
p_sched->b_enabled = VLC_FALSE; p_sched->b_enabled = VLC_FALSE;
......
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