[Libvir] [patch 1/5] iptables: fix invalid free

Daniel Veillard veillard at redhat.com
Wed Mar 21 14:19:02 UTC 2007


On Wed, Mar 21, 2007 at 01:57:09PM +0000, David Edmondson wrote:
> On Wed, Mar 21, 2007 at 09:39:15AM -0400, Daniel Veillard wrote:
> >   Well, one of the things I do in my wrapper is initilize to -1 all newly
> > allocated bytes, allows to pinpoint relatively easilly when you assumed zeroed
> > memory which was not, while not paying for the initialization when not needed.
> 
> If you initialise the bytes to -1, don't you always pay the cost of
> initialisation?

  that's just when I use the debugging set of routines, off in the normal case.
Somehow valgrind should now allow to spot those kind of errors, but valgrind
ain't everywhere.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/




More information about the libvir-list mailing list