diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2015-08-27 01:34:50 +0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2015-09-01 11:07:10 -0500 |
commit | 4bca81ceedb59397f6082777f6ed4b39d456be85 (patch) | |
tree | 675ba43edd7da179ff0e3ae15748cc4b2975fb1f /qga/commands-win32.c | |
parent | 23b42894b389eccb45ab66da3a3e77d3a8cfc2b6 (diff) |
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>
Diffstat (limited to 'qga/commands-win32.c')
-rw-r--r-- | qga/commands-win32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qga/commands-win32.c b/qga/commands-win32.c index a7822d5ff7..1152c46280 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -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++)); } } |