aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index f5afed4c49..b9146cfdea 100644
--- a/vl.c
+++ b/vl.c
@@ -953,8 +953,8 @@ static void numa_add(const char *optarg)
node_mem[nodenr] = 0;
} else {
int64_t sval;
- sval = strtosz(option, NULL);
- if (sval < 0) {
+ sval = strtosz(option, &endptr);
+ if (sval < 0 || *endptr) {
fprintf(stderr, "qemu: invalid numa mem size: %s\n", optarg);
exit(1);
}