aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-10-04 12:03:25 +0930
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-13 05:46:55 +0900
commit827b6f1473f92a3da862da171ce13b00f68d5be3 (patch)
treeb2464506b64d71555f5052ccdba09d9632c3ad42
parentb4ee9f0173843b3657130a6c1a619ba9b4ea9532 (diff)
lguest: fix occasional crash in example launcher.
commit ca16f580a5db7e60bfafe59a50bb133bd3347491 upstream. We usually got away with ->next on the final entry being NULL, but it finally bit me. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--tools/lguest/lguest.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lguest/lguest.c b/tools/lguest/lguest.c
index f759f4f097c..fd2f9221b24 100644
--- a/tools/lguest/lguest.c
+++ b/tools/lguest/lguest.c
@@ -1299,6 +1299,7 @@ static struct device *new_device(const char *name, u16 type)
dev->feature_len = 0;
dev->num_vq = 0;
dev->running = false;
+ dev->next = NULL;
/*
* Append to device list. Prepending to a single-linked list is