From: Rusty Russell Date: Thu, 4 Oct 2012 02:33:25 +0000 (+0930) Subject: lguest: fix occasional crash in example launcher. X-Git-Tag: v3.5.7~117 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=827b6f1473f92a3da862da171ce13b00f68d5be3;p=karo-tx-linux.git 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 Signed-off-by: Greg Kroah-Hartman --- 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