mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
qga: make split_list() return allocated strings
In order to avoid any confusion, let's allocate new strings when splitting. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
This commit is contained in:
parent
23b42894b3
commit
4bca81ceed
3 changed files with 14 additions and 18 deletions
|
@ -1233,7 +1233,7 @@ GList *ga_command_blacklist_init(GList *blacklist)
|
|||
char **p = (char **)list_unsupported;
|
||||
|
||||
while (*p) {
|
||||
blacklist = g_list_append(blacklist, *p++);
|
||||
blacklist = g_list_append(blacklist, g_strdup(*p++));
|
||||
}
|
||||
|
||||
if (!vss_init(true)) {
|
||||
|
@ -1244,7 +1244,7 @@ GList *ga_command_blacklist_init(GList *blacklist)
|
|||
p = (char **)list;
|
||||
|
||||
while (*p) {
|
||||
blacklist = g_list_append(blacklist, *p++);
|
||||
blacklist = g_list_append(blacklist, g_strdup(*p++));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue