Commit 2348c8a9 authored by Radu Caragea's avatar Radu Caragea Committed by Daniel P. Berrange

Fix memory allocation when adding VM features

Features should be allocated with 2 elements, one to be "acpi"
and one to be a NULL pointer indicating string array termination.
Caught with valgrind
parent 0994d94c
# 'git shortlog --help' and look for mailmap for the format of each line
# Email consolidation:
# <Preferred address in AUTHORS> <other alias used by same author>
<> <>
......@@ -391,7 +391,7 @@ static gboolean gvir_sandbox_builder_machine_construct_features(GVirSandboxBuild
construct_features(builder, config, configdir, cleaner, domain, error))
return FALSE;
features = g_new0(gchar *, 1);
features = g_new0(gchar *, 2);
features[0] = g_strdup("acpi");
gvir_config_domain_set_features(domain, features);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment