core: fix segfault on "systemctl --set-property UNIT BlockIODeviceWeight=WEIGHT"

bus_append_unit_property_assignment() was missing an argument for
sd_bus_message_append() when processing BlockIODeviceWeight leading to
segfault.  Fix it.

Signed-off-by: Tejun Heo <htejun@fb.com>
This commit is contained in:
Tejun Heo
2016-05-04 17:43:13 -04:00
committed by Tejun Heo
parent ccf78df1fc
commit 096a4d53dc
+1 -1
View File
@@ -331,7 +331,7 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen
log_error("Failed to parse %s value %s.", field, weight);
return -EINVAL;
}
r = sd_bus_message_append(m, "v", "a(st)", path, u);
r = sd_bus_message_append(m, "v", "a(st)", 1, path, u);
}
} else if (streq(field, "Nice")) {