Message ID | 1436455976-17725-1-git-send-email-ehabkost@redhat.com |
---|---|
State | New |
Headers | show |
On Thu, Jul 09, 2015 at 12:32:56PM -0300, Eduardo Habkost wrote: > Now object_property_add_alias() calls g_strdup() on the target property > name, so we don't need to call g_strdup() ourselves. > > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Applied to the x86 tree.
diff --git a/target-i386/cpu.c b/target-i386/cpu.c index b4f9461..9cd1318 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -3021,7 +3021,7 @@ static void x86_cpu_register_feature_bit_props(X86CPU *cpu, for (i = 1; names[i]; i++) { feat2prop(names[i]); - object_property_add_alias(obj, names[i], obj, g_strdup(names[0]), + object_property_add_alias(obj, names[i], obj, names[0], &error_abort); }
Now object_property_add_alias() calls g_strdup() on the target property name, so we don't need to call g_strdup() ourselves. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)