summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTejun Heo <htejun@fb.com>2016-05-04 17:43:13 -0400
committerTejun Heo <tj@kernel.org>2016-05-04 17:43:13 -0400
commit096a4d53dcafb1181193d0c1880a8204733fa6ab (patch)
tree2d3ed1e22f12de30a5921ae6359c7a2209aab58b /src
parentccf78df1fcaad6b215b17981c42eaef380f69c9c (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/shared/bus-unit-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c
index e36a7741a8..ee388b82db 100644
--- a/src/shared/bus-unit-util.c
+++ b/src/shared/bus-unit-util.c
@@ -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")) {