diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c index 7f0e7f65dc..e629c6bd9b 100644 --- a/src/qemu/qemu_monitor_text.c +++ b/src/qemu/qemu_monitor_text.c @@ -593,7 +593,8 @@ int qemuMonitorTextGetMemoryStats(qemuMonitorPtr mon, } if ((offset = strstr(reply, BALLOON_PREFIX)) != NULL) { - if ((offset = strchr(reply, ',')) != NULL) { + offset += strlen(BALLOON_PREFIX); + if ((offset = strchr(offset, ',')) != NULL) { ret = qemuMonitorParseExtraBalloonInfo(offset, stats, nr_stats); } }