diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-04-07 08:16:15 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-04-07 08:16:15 +0100 |
commit | 15d5739ea96c83a989c31e5f28436004cf831035 (patch) | |
tree | aa82d1cc429dfc7b1bc0ff331c84774c7151ef14 /extras/mini-os/pcifront.c | |
parent | 42e3a21b11ec98ecfd1e3473c9bbc8e9e98b10b5 (diff) | |
download | xen-15d5739ea96c83a989c31e5f28436004cf831035.tar.gz xen-15d5739ea96c83a989c31e5f28436004cf831035.tar.bz2 xen-15d5739ea96c83a989c31e5f28436004cf831035.zip |
mini-os: Fix crash on frontend shutdown failures
Do not free frontend resources if some error happened, since the
backend may not have finished properly restarting in such case.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'extras/mini-os/pcifront.c')
-rw-r--r-- | extras/mini-os/pcifront.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extras/mini-os/pcifront.c b/extras/mini-os/pcifront.c index 638fdb3966..dc6c461de8 100644 --- a/extras/mini-os/pcifront.c +++ b/extras/mini-os/pcifront.c @@ -378,7 +378,8 @@ close_pcifront: snprintf(path, sizeof(path), "%s/event-channel", nodename); xenbus_rm(XBT_NIL, path); - free_pcifront(dev); + if (!err) + free_pcifront(dev); } int pcifront_physical_to_virtual (struct pcifront_dev *dev, |