提交 c58b1056 编写于 作者: J Jim Fehlig

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.
上级 37f869da
......@@ -73,6 +73,7 @@ virBitmapPtr virBitmapAlloc(size_t size)
return NULL;
}
bitmap->size = size;
return bitmap;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部