diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-10-04 12:03:25 +0930 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-13 05:50:19 +0900 |
commit | 60b3e539bffddda2f1dd41d77e7353e864cca210 (patch) | |
tree | 5571e9b1a561a59f772063e08f5226cde6ac7f28 /tools/lguest | |
parent | 0c9f520eff046d5dea7ab8ac20f5835288300625 (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>
Diffstat (limited to 'tools/lguest')
-rw-r--r-- | tools/lguest/lguest.c | 1 |
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 |