summaryrefslogtreecommitdiff
path: root/qemu-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-io.c')
-rw-r--r--qemu-io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-io.c b/qemu-io.c
index b55a550f27..33c96c4c1c 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -356,7 +356,7 @@ static void command_loop(void)
static void add_user_command(char *optarg)
{
- cmdline = g_realloc(cmdline, ++ncmdline * sizeof(char *));
+ cmdline = g_renew(char *, cmdline, ++ncmdline);
cmdline[ncmdline-1] = optarg;
}