mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
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.
This commit is contained in:
parent
37f869dab7
commit
c58b105625
@ -73,6 +73,7 @@ virBitmapPtr virBitmapAlloc(size_t size)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bitmap->size = size;
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user