kvm tools: fix instances enumeration
commit737579f6b7e0653ecec7f09aea3b11ba67a69ccf
authorKonstantin Khlebnikov <khlebnikov@openvz.org>
Sun, 10 Jul 2011 12:13:27 +0000 (10 16:13 +0400)
committerPekka Enberg <penberg@kernel.org>
Sun, 10 Jul 2011 12:21:58 +0000 (10 15:21 +0300)
treec38270f74651f64d5f2a74a6767c2f1434e881c4
parentaa722c822a5fa38634d69a5653e0e65a8029157e
kvm tools: fix instances enumeration

Calling readdir() with NULL dirp leads to segfault.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
[ penberg@kernel.org: use 'while' instead of 'for' ]
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/kvm.c