while (*cmd_list) {
cmd_info = g_malloc0(sizeof(GuestAgentCommandInfo));
- cmd_info->name = strdup(*cmd_list);
+ cmd_info->name = g_strdup(*cmd_list);
cmd_info->enabled = qmp_command_is_enabled(cmd_info->name);
cmd_info_list = g_malloc0(sizeof(GuestAgentCommandInfoList));