[ 021/122] lguest: fix occasional crash in example launcher.

Greg Kroah-Hartman
2012-10-10T23:16:09Z

From: Rusty Russell <rusty@rustcorp.com.au>

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>

---
tools/lguest/lguest.c | 1 +
1 file changed, 1 insertion(+)

--- a/tools/lguest/lguest.c
+++ b/tools/lguest/lguest.c
@@ -1299,6 +1299,7 @@ static struct device *new_device(const c
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