Commit 25cdd31d authored by Sam Hocevar's avatar Sam Hocevar

* ./src/interface/intf_msg.c, src/interface/intf_playlist.c: disabled

    calls to realloc(_,0) in a similar way to input_programs.c.
parent 497ce52c
/*****************************************************************************
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: input_programs.c,v 1.87 2002/05/16 13:20:22 gbazin Exp $
* Copyright (C) 1999-2002 VideoLAN
* $Id: input_programs.c,v 1.88 2002/05/17 00:58:14 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......
......@@ -4,7 +4,7 @@
* interface, such as message output. See config.h for output configuration.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: intf_msg.c,v 1.48 2002/04/24 00:36:24 sam Exp $
* $Id: intf_msg.c,v 1.49 2002/05/17 00:58:13 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -180,8 +180,16 @@ void intf_MsgUnsub( intf_subscription_t *p_sub )
}
msg_bank.i_sub--;
if( msg_bank.i_sub )
{
msg_bank.pp_sub = realloc( msg_bank.pp_sub,
msg_bank.i_sub * sizeof( intf_subscription_t* ) );
}
else
{
free( msg_bank.pp_sub );
msg_bank.pp_sub = NULL;
}
vlc_mutex_unlock( &msg_bank.lock );
}
......
......@@ -2,7 +2,7 @@
* intf_playlist.c : Playlist management functions
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: intf_playlist.c,v 1.13 2002/01/10 04:11:25 sam Exp $
* $Id: intf_playlist.c,v 1.14 2002/05/17 00:58:13 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -198,8 +198,16 @@ int intf_PlaylistDelete( playlist_t * p_playlist, int i_pos )
/* Decrement playlist size */
p_playlist->i_size--;
if( p_playlist->i_size )
{
p_playlist->p_item = realloc( p_playlist->p_item,
p_playlist->i_size * sizeof( playlist_item_t ) );
}
else
{
free( p_playlist->p_item );
p_playlist->p_item = NULL;
}
intf_WarnMsg( 3, "intf: removed `%s' from playlist", psz_name );
......
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