Permalink
Browse files

lguest: fix occasional crash in example launcher.

commit ca16f58 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>
  • Loading branch information...
1 parent 0c9f520 commit 60b3e539bffddda2f1dd41d77e7353e864cca210 @rustyrussell rustyrussell committed with gregkh Oct 4, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 tools/lguest/lguest.c
View
@@ -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

0 comments on commit 60b3e53

Please sign in to comment.