summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/virtio-9p-debug.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/virtio-9p-debug.c b/hw/virtio-9p-debug.c
index e4ab4bca5f..c1b0e6f066 100644
--- a/hw/virtio-9p-debug.c
+++ b/hw/virtio-9p-debug.c
@@ -327,6 +327,8 @@ void pprint_pdu(V9fsPDU *pdu)
llogfile = fopen("/tmp/pdu.log", "w");
}
+ BUG_ON(!llogfile);
+
switch (pdu->id) {
case P9_TVERSION:
fprintf(llogfile, "TVERSION: (");