Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
libvirt
9c77bf04-fix-virnetserver-refcnt.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 9c77bf04-fix-virnetserver-refcnt.patch of Package libvirt
commit 9c77bf04b03ff026bb37212a195070d8983f530d Author: Hu Tao <hutao@cn.fujitsu.com> Date: Fri Jun 22 11:26:03 2012 +0800 fix a bug of ref count in virnetserver.c The test of ref count is not protected by lock, which is unsafe because the ref count may have been changed by other threads during the test. This patch fixes this. Index: libvirt-0.9.11.4/src/rpc/virnetserver.c =================================================================== --- libvirt-0.9.11.4.orig/src/rpc/virnetserver.c +++ libvirt-0.9.11.4/src/rpc/virnetserver.c @@ -794,15 +794,16 @@ void virNetServerQuit(virNetServerPtr sr void virNetServerFree(virNetServerPtr srv) { int i; + int refs; if (!srv) return; virNetServerLock(srv); VIR_DEBUG("srv=%p refs=%d", srv, srv->refs); - srv->refs--; + refs = --srv->refs; virNetServerUnlock(srv); - if (srv->refs > 0) + if (refs > 0) return; for (i = 0 ; i < srv->nservices ; i++)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor