[libvirt] [PATCH] parallels: Cleanup partly opened drivers on connect open failure

Ján Tomko jtomko at redhat.com
Wed Mar 4 15:53:34 UTC 2015


On Thu, Feb 26, 2015 at 05:29:53PM +0100, Michal Privoznik wrote:
> Well, the parallelsConnectOpen() joins several sub-driver openings
> into one big if condition. If any of sub-driver fails to open, the
> whole API finishes immediately. The problem is, sub-drivers may have
> left some memory allocated. Fortunately, we have a free function for
> that: parallelsConnectClose(). This is, however, not prepared for
> partially allocated driver structure. So, prepare the free function
> for it and call it at the right place, in the if body.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
> 
> This commit assumes that virNetworkObjListFree() accepts NULL,
> and thus depends on this patch (which has been ACKed already):
> 
> https://www.redhat.com/archives/libvir-list/2015-February/msg01127.html
> 
> Should I push both during freeze or wait until after the release?

Pushing it after the release is more realistic, in my opinion.

> 
>  src/parallels/parallels_driver.c  | 7 ++++++-
>  src/parallels/parallels_network.c | 4 ++++
>  src/parallels/parallels_storage.c | 6 ++++++
>  3 files changed, 16 insertions(+), 1 deletion(-)

ACK

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150304/e28a73d5/attachment-0001.sig>


More information about the libvir-list mailing list