xm_internal.c: fix locking bug: s/Lock/Unlock/

* src/xm_internal.c (xenXMDomainDefineXML): Release lock, (don't
try to acquire it) upon failure, just before returning.
This commit is contained in:
Jim Meyering 2009-01-22 19:18:24 +00:00
parent a7acdde406
commit d0eab955c2
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
Thu Jan 22 20:17:35 +0100 2009 Jim Meyering <meyering@redhat.com>
xm_internal.c: fix locking bug: s/Lock/Unlock/
* src/xm_internal.c (xenXMDomainDefineXML): Release lock, (don't
try to acquire it) upon failure, just before returning.
Thu Jan 22 10:35:03 PST 2009 John Levon <john.levon@sun.com> Thu Jan 22 10:35:03 PST 2009 John Levon <john.levon@sun.com>
* gnulib/tests/.cvsignore: add test-random_r * gnulib/tests/.cvsignore: add test-random_r

View File

@ -2357,7 +2357,7 @@ virDomainPtr xenXMDomainDefineXML(virConnectPtr conn, const char *xml) {
if (!(def = virDomainDefParseString(conn, priv->caps, xml, if (!(def = virDomainDefParseString(conn, priv->caps, xml,
VIR_DOMAIN_XML_INACTIVE))) { VIR_DOMAIN_XML_INACTIVE))) {
xenUnifiedLock(priv); xenUnifiedUnlock(priv);
return (NULL); return (NULL);
} }