[MPlayer-dev-eng] [PATCH] Fix memleak in stream_dvb.c

Nico Sabbi Nicola.Sabbi at poste.it
Thu Dec 13 09:58:44 CET 2007


Il Wednesday 12 December 2007 09:41:35 Nico Sabbi ha scritto:
> Il Wednesday 12 December 2007 03:41:41 Andrew Calkin ha scritto:
> > Patch does $subj. get_path() in dvb_get_config() returns a
> > malloc'd string which is never free'd. Attached patch should
> > address this.
> >
> > //Andrew
> > dvb_free.diff
> >   --- MPlayer/stream/stream_dvb.c 2007-12-12 11:33:30.000000000
> > +0900 +++ MPlayer/stream/stream_dvb.c 2007-12-12
> > 11:31:27.000000000 +0900 @@ -796,9 +796,15 @@
> >                 }
> >                 
> >                 if((access(conf_file, F_OK | R_OK) != 0))
> > +               {
> > +                       if (conf_file)
> > +                               free(conf_file);
> >                         conf_file = get_path("channels.conf");
> > +               }
> >  
> >                 list = dvb_get_channels(conf_file, type);
> > +               if (conf_file)
> > +                       free(conf_file);
> >                 if(list == NULL)
> >                         continue;
>
> ok

applied


More information about the MPlayer-dev-eng mailing list