aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/fbfront.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-04-07 08:16:15 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-04-07 08:16:15 +0100
commit15d5739ea96c83a989c31e5f28436004cf831035 (patch)
treeaa82d1cc429dfc7b1bc0ff331c84774c7151ef14 /extras/mini-os/fbfront.c
parent42e3a21b11ec98ecfd1e3473c9bbc8e9e98b10b5 (diff)
downloadxen-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/fbfront.c')
-rw-r--r--extras/mini-os/fbfront.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/extras/mini-os/fbfront.c b/extras/mini-os/fbfront.c
index 6d2268e27e..ef024cbcd0 100644
--- a/extras/mini-os/fbfront.c
+++ b/extras/mini-os/fbfront.c
@@ -288,7 +288,8 @@ close_kbdfront:
snprintf(path, sizeof(path), "%s/request-abs-pointer", nodename);
xenbus_rm(XBT_NIL, path);
- free_kbdfront(dev);
+ if (!err)
+ free_kbdfront(dev);
}
#ifdef HAVE_LIBC
@@ -681,7 +682,8 @@ close_fbfront:
snprintf(path, sizeof(path), "%s/feature-update", nodename);
xenbus_rm(XBT_NIL, path);
- free_fbfront(dev);
+ if (!err)
+ free_fbfront(dev);
}
#ifdef HAVE_LIBC