]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Set bitmap size when allocating a bitmap
authorJim Fehlig <jfehlig@novell.com>
Wed, 22 Dec 2010 18:15:32 +0000 (11:15 -0700)
committerJim Fehlig <jfehlig@novell.com>
Wed, 22 Dec 2010 20:37:52 +0000 (13:37 -0700)
commitc58b105625acf3404d75376b070903139e3346a3
tree47a9833400c489ab348eccf5df067490da33b886
parent37f869dab7ba28fe11fee70bca9fd949d3aa9b25
Set bitmap size when allocating a bitmap

I began noticing a race when reserving VNC ports as described here

https://www.redhat.com/archives/libvir-list/2010-November/msg00379.html

Turns out that we were not initializing the size field of bitmap
struct when allocating the bitmap.  This subsequently caused
virBitmapSetBit() to fail since bitmap->size is 0, hence we never
actually reserved the port.
src/util/bitmap.c