Changeset 1172bcd38c3382983662782040e49fdada1f6cef

Show
Ignore:
Timestamp:
01/08/08 15:45:32 (4 months ago)
Author:
Rémi Duraffort <ivoire@videolan.org>
git-committer:
Rémi Duraffort <ivoire@videolan.org> 1217598332 +0200
git-parent:

[31a163942d6682ae31679e6e2be898f9314b2cc0]

git-author:
Rémi Duraffort <ivoire@videolan.org> 1217598332 +0200
Message:

Fix xosd memleaks.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/misc/notify/xosd.c

    r415ada5 r1172bcd  
    109109    intf_thread_t *p_intf = (intf_thread_t *)p_this; 
    110110    xosd *p_osd; 
     111    char *psz_font, psz_colour; 
    111112 
    112113    /* Allocate instance and initialize some members */ 
     
    126127    /* Initialize library */ 
    127128#if defined(HAVE_XOSD_VERSION_0) || defined(HAVE_XOSD_VERSION_1) 
    128     p_osd  = p_intf->p_sys->p_osd = 
    129         xosd_init( config_GetPsz( p_intf, "xosd-font" ), 
    130                    config_GetPsz( p_intf,"xosd-colour" ), 3, 
    131                    XOSD_top, 0, 1 ); 
     129    psz_font = config_GetPsz( p_intf, "xosd-font" ); 
     130    psz_colour = config_GetPsz( p_intf,"xosd-colour" ); 
     131    p_osd  = p_intf->p_sys->p_osd = xosd_init( psz_font, psz_colour, 3, 
     132                                               XOSD_top, 0, 1 ); 
     133    free( psz_font ); 
     134    free( psz_colour ); 
     135 
    132136    if( p_intf->p_sys->p_osd == NULL ) 
    133137    { 
     
    142146        return VLC_EGENERIC; 
    143147    } 
    144     xosd_set_colour( p_osd, config_GetPsz( p_intf,"xosd-colour" ) ); 
     148 
     149    psz_colour = config_GetPsz( p_intf,"xosd-colour" ); 
     150    xosd_set_colour( p_osd, psz_colour ); 
    145151    xosd_set_timeout( p_osd, 3 ); 
     152    free( psz_colour ); 
    146153#endif 
    147154 
     
    153160 
    154161    /* Set user preferences */ 
    155     xosd_set_font( p_intf->p_sys->p_osd, 
    156                     config_GetPsz( p_intf, "xosd-font" ) ); 
     162    psz_font = config_GetPsz( p_intf, "xosd-font" ); 
     163    xosd_set_font( p_intf->p_sys->p_osd, psz_font ); 
     164    free( psz_font ); 
    157165    xosd_set_outline_colour( p_intf->p_sys->p_osd,"black" ); 
    158166#ifdef HAVE_XOSD_VERSION_2