From 15d5739ea96c83a989c31e5f28436004cf831035 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 7 Apr 2010 08:16:15 +0100 Subject: 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 --- extras/mini-os/netfront.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'extras/mini-os/netfront.c') diff --git a/extras/mini-os/netfront.c b/extras/mini-os/netfront.c index 491876fd9a..bc70b98b4a 100644 --- a/extras/mini-os/netfront.c +++ b/extras/mini-os/netfront.c @@ -574,7 +574,8 @@ close: snprintf(path, sizeof(path), "%s/request-rx-copy", nodename); xenbus_rm(XBT_NIL, path); - free_netfront(dev); + if (!err) + free_netfront(dev); } -- cgit v1.2.3