aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hmp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hmp.c b/hmp.c
index 9294114..8eec768 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1825,8 +1825,10 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
case MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE:
p->has_xbzrle_cache_size = true;
visit_type_size(v, param, &cache_size, &err);
- if (err || cache_size > INT64_MAX
- || (size_t)cache_size != cache_size) {
+ if (err) {
+ break;
+ }
+ if (cache_size > INT64_MAX || (size_t)cache_size != cache_size) {
error_setg(&err, "Invalid size %s", valuestr);
break;
}