mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03: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>
|
||||
|
||||
* src/openvz_driver.c: patch from Evgeniy Sokolov to get OpenVZ
|
||||
|
@ -239,7 +239,7 @@ xenUnifiedProbe (void)
|
||||
static int
|
||||
xenUnifiedOpen (virConnectPtr conn, xmlURIPtr uri, virConnectAuthPtr auth, int flags)
|
||||
{
|
||||
int i;
|
||||
int i, ret = VIR_DRV_OPEN_DECLINED;
|
||||
xenUnifiedPrivatePtr priv;
|
||||
|
||||
/* Refuse any scheme which isn't "xen://" or "http://". */
|
||||
@ -329,19 +329,22 @@ xenUnifiedOpen (virConnectPtr conn, xmlURIPtr uri, virConnectAuthPtr auth, int f
|
||||
}
|
||||
#else
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
return VIR_DRV_OPEN_SUCCESS;
|
||||
|
||||
fail:
|
||||
fail:
|
||||
ret = VIR_DRV_OPEN_ERROR;
|
||||
clean:
|
||||
DEBUG0("Failed to activate a mandatory sub-driver");
|
||||
for (i = 0 ; i < XEN_UNIFIED_NR_DRIVERS ; i++)
|
||||
if (priv->opened[i]) drivers[i]->close(conn);
|
||||
VIR_FREE(priv);
|
||||
return VIR_DRV_OPEN_ERROR;
|
||||
return ret
|
||||
}
|
||||
|
||||
#define GET_PRIVATE(conn) \
|
||||
|
Loading…
Reference in New Issue
Block a user