[vlc-devel] commit: libvlc: Don't use input_ItemClean. Anyway when we leak an object there is no use to delete it in the end. The mistake has already been done. (Pierre d'Herbemont )

Rafaël Carré funman at videolan.org
Mon Mar 31 06:26:44 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le Mon, 31 Mar 2008 00:44:54 +0200 (CEST),
git at videolan.org (git version control) a écrit :

> vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org>
> | Mon Mar 31 00:44:25 2008 +0200|
> [459f98e9d2db903cc935d9e036615a413676eef8]
> 
> libvlc: Don't use input_ItemClean. Anyway when we leak an object
> there is no use to delete it in the end. The mistake has already been
> done.
> 
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=459f98e9d2db903cc935d9e036615a413676eef8
> ---
> 
>  src/libvlc-common.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/src/libvlc-common.c b/src/libvlc-common.c
> index a0ba3cd..d4573c5 100644
> --- a/src/libvlc-common.c
> +++ b/src/libvlc-common.c
> @@ -989,8 +989,7 @@ int libvlc_InternalCleanup( libvlc_int_t
> *p_libvlc ) msg_Dbg( p_libvlc, "removing remaining input items" );
>      FOREACH_ARRAY( input_item_t *p_del, p_libvlc->input_items )
>          msg_Dbg( p_libvlc, "WARNING: %p input item has not been
> deleted properly", p_del );
> -        input_ItemClean( p_del );
> -        free( p_del );
> +        /* Don't do anything, faulting code should be fixed */
>      FOREACH_END();
>      ARRAY_RESET( p_libvlc->input_items );

input items are not objects.
Where are those supposed to be deleted, if not at libvlc destruction ?
To force code to be fixed, abort() is generally a very good idea.

Another thing, there is msg_Warn to display warnings.

- -- 
Rafaël Carré
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.8 (FreeBSD)

iEYEARECAAYFAkfwaAcACgkQYWCeGMCv8Q+5HACggUC8V8xJghoJzhbqh0aGzpOt
PW8AoKSjBDoitM67kwKoPai2qtyGfXmV
=2afZ
-----END PGP SIGNATURE-----


More information about the vlc-devel mailing list