提交 24a53049 编写于 作者: M Markus Armbruster 提交者: Stefan Hajnoczi

qemu-ga: Fix unchecked strdup() by converting to g_strdup()

I figure it's freed somewhere deep down in QAPI, with g_free().
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NLuiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 13b10e05
......@@ -61,7 +61,7 @@ struct GuestAgentInfo *qmp_guest_info(Error **err)
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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册