]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
lguest: fix occasional crash in example launcher.
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 4 Oct 2012 02:33:25 +0000 (12:03 +0930)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Oct 2012 20:46:55 +0000 (05:46 +0900)
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>
tools/lguest/lguest.c

index f759f4f097c7f5ea2693a0257b914e78fea113bb..fd2f9221b24120e25d32c2c8d8b4849d8d24569a 100644 (file)
@@ -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