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:38:38 +0900 |
commit | 9825e3158e302980b71c54b72e90f0624e1cfab3 (patch) | |
tree | ad239e0cab8597119fbe80c666c4dfcddb8cef16 /tools | |
parent | 0c0b534583fb1c02809e0a3978413fe79f7dac8f (diff) | |
download | lwn-9825e3158e302980b71c54b72e90f0624e1cfab3.tar.gz lwn-9825e3158e302980b71c54b72e90f0624e1cfab3.zip |
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')
-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 f759f4f097c7..fd2f9221b241 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 |