提交 616003d6 编写于 作者: M Michael Chapman 提交者: Peter Krempa

domain_conf: fix crash in virDomainObjListFindByUUIDInternal

If a domain object is being removed and looked up concurrently we must
ensure we unlock the object before unreferencing it, since the latter
might free the object.

The flaw was introduced in commit feb1a4d7.
Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
上级 a6ec4f47
......@@ -1068,9 +1068,9 @@ virDomainObjListFindByUUIDInternal(virDomainObjListPtr doms,
if (obj) {
virObjectLock(obj);
if (obj->removing) {
virObjectUnlock(obj);
if (ref)
virObjectUnref(obj);
virObjectUnlock(obj);
obj = NULL;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册