[libvirt] [PATCH] vbox: don't crash if init fails early

Hi, not having set up pfuncs already results in a core dump. O.k. to apply? Cheers, -- Guido

On Thu, May 07, 2009 at 10:52:15AM +0200, Guido G?nther wrote:
Hi, not having set up pfuncs already results in a core dump. O.k. to apply?
ACK, Looks good. Daniel
From f01472982e8a00c98937a6f4a41c59a061a9ed98 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org> Date: Thu, 7 May 2009 10:31:21 +0200 Subject: [PATCH] don't crash if init fails early
--- src/vbox/vbox_tmpl.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 7297172..6507a69 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -291,7 +291,8 @@ static int vboxExtractVersion(virConnectPtr conn, vboxGlobalData *data) { }
static void vboxUninitialize(vboxGlobalData *data) { - data->pFuncs->pfnComUninitialize(); + if (data->pFuncs) + data->pFuncs->pfnComUninitialize(); VBoxCGlueTerm();
if (!data) -- 1.6.2.4
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
-- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (3)
-
Daniel P. Berrange
-
Guido Günther
-
Pritesh Kothari