Skip to content

Commit

Permalink
lguest: fix occasional crash in example launcher.
Browse files Browse the repository at this point in the history
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>
Cc: stable@kernel.org
  • Loading branch information
rustyrussell committed Oct 4, 2012
1 parent bb81110 commit ca16f58
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/lguest/lguest.c
Expand Up @@ -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
Expand Down

0 comments on commit ca16f58

Please sign in to comment.