commit: ca16f580a5db7e60bfafe59a50bb133bd3347491
From: Rusty Russell <[email protected]>
Date: Thu, 4 Oct 2012 12:03:25 +0930
Subject: lguest: fix occasional crash in example launcher.

We usually got away with ->next on the final entry being NULL, but it
finally bit me.

Signed-off-by: Rusty Russell <[email protected]>
Cc: [email protected]
---
 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 f759f4f..fd2f922 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
-- 
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to