diff options
Diffstat (limited to 'qga/commands.c')
-rw-r--r-- | qga/commands.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qga/commands.c b/qga/commands.c index 80501e4a73..72e6022207 100644 --- a/qga/commands.c +++ b/qga/commands.c @@ -244,7 +244,7 @@ static char **guest_exec_get_args(const strList *entry, bool log) str = g_malloc(str_size); *str = 0; - args = g_malloc(count * sizeof(char *)); + args = g_new(char *, count); for (it = entry; it != NULL; it = it->next) { args[i++] = it->value; pstrcat(str, str_size, it->value); |