[vlc-devel] commit: rss: factorize. ( R??mi Duraffort )

jpd at videolan.org jpd at videolan.org
Thu Jul 2 10:04:54 CEST 2009


On Wed, Jul 01, 2009 at 09:49:22PM +0200, R?mi Duraffort wrote:
> > On Wed, Jul 01, 2009 at 11:54:42AM +0200, git version control wrote:
> > > vlc | branch: master | R??mi Duraffort <ivoire at videolan.org> | Wed Jul  1 11:37:16 2009 +0200| [bd70c3b448bc5ca4a61502dedea8f00383bd605b] | committer: R??mi Duraffort 
> > [snip]
> > >      /* Allocate structure */
> > >      p_sys = p_filter->p_sys = malloc( sizeof( filter_sys_t ) );
> > 
> > I think this should probably be a calloc() instead?
> 
> The call to calloc will fill the memory with zeros. As we are then
> filling the memory with some usefull value (non-zero) I think a malloc
> is enough (I don't see the reason to use calloc).

I was thinking garbage might be passed to free() or a cleanup function
in case of error. But I have to admit I haven't reviewed the code.




More information about the vlc-devel mailing list