mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
* src/xen_unified.c: fix a leak in xenUnifiedOpen
Daniel
This commit is contained in:
parent
7b4f67acea
commit
403a5163c9
@ -1,3 +1,7 @@
|
|||||||
|
Mon Jul 21 11:47:08 CEST 2008 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
|
* src/xen_unified.c: fix a leak in xenUnifiedOpen
|
||||||
|
|
||||||
Mon Jul 21 10:07:08 CEST 2008 Daniel Veillard <veillard@redhat.com>
|
Mon Jul 21 10:07:08 CEST 2008 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
* src/openvz_driver.c: patch from Evgeniy Sokolov to get OpenVZ
|
* src/openvz_driver.c: patch from Evgeniy Sokolov to get OpenVZ
|
||||||
|
@ -239,7 +239,7 @@ xenUnifiedProbe (void)
|
|||||||
static int
|
static int
|
||||||
xenUnifiedOpen (virConnectPtr conn, xmlURIPtr uri, virConnectAuthPtr auth, int flags)
|
xenUnifiedOpen (virConnectPtr conn, xmlURIPtr uri, virConnectAuthPtr auth, int flags)
|
||||||
{
|
{
|
||||||
int i;
|
int i, ret = VIR_DRV_OPEN_DECLINED;
|
||||||
xenUnifiedPrivatePtr priv;
|
xenUnifiedPrivatePtr priv;
|
||||||
|
|
||||||
/* Refuse any scheme which isn't "xen://" or "http://". */
|
/* Refuse any scheme which isn't "xen://" or "http://". */
|
||||||
@ -329,19 +329,22 @@ xenUnifiedOpen (virConnectPtr conn, xmlURIPtr uri, virConnectAuthPtr auth, int f
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
DEBUG0("Handing off for remote driver");
|
DEBUG0("Handing off for remote driver");
|
||||||
return VIR_DRV_OPEN_DECLINED; /* Let remote_driver try instead */
|
ret = VIR_DRV_OPEN_DECLINED; /* Let remote_driver try instead */
|
||||||
|
goto clean;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return VIR_DRV_OPEN_SUCCESS;
|
return VIR_DRV_OPEN_SUCCESS;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
ret = VIR_DRV_OPEN_ERROR;
|
||||||
|
clean:
|
||||||
DEBUG0("Failed to activate a mandatory sub-driver");
|
DEBUG0("Failed to activate a mandatory sub-driver");
|
||||||
for (i = 0 ; i < XEN_UNIFIED_NR_DRIVERS ; i++)
|
for (i = 0 ; i < XEN_UNIFIED_NR_DRIVERS ; i++)
|
||||||
if (priv->opened[i]) drivers[i]->close(conn);
|
if (priv->opened[i]) drivers[i]->close(conn);
|
||||||
VIR_FREE(priv);
|
VIR_FREE(priv);
|
||||||
return VIR_DRV_OPEN_ERROR;
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GET_PRIVATE(conn) \
|
#define GET_PRIVATE(conn) \
|
||||||
|
Loading…
Reference in New Issue
Block a user