summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-control.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2013-12-03 14:38:53 +0100
committerDaniel Mack <zonque@gmail.com>2013-12-03 14:38:53 +0100
commit89fbb95e03dbaf6762a8d83c7dd544b387e9314e (patch)
tree6a29ec0955da47d9bb2b80db0faf94d21e2d7392 /src/libsystemd-bus/bus-control.c
parentcde360cd5de39fb910ebfcc0839f8c3fa465ef8b (diff)
libsystemd-bus: catch up with latest kdbus changes
Diffstat (limited to 'src/libsystemd-bus/bus-control.c')
-rw-r--r--src/libsystemd-bus/bus-control.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-control.c b/src/libsystemd-bus/bus-control.c
index aaddb7d374..5cb32eaa4c 100644
--- a/src/libsystemd-bus/bus-control.c
+++ b/src/libsystemd-bus/bus-control.c
@@ -178,10 +178,11 @@ _public_ int sd_bus_list_names(sd_bus *bus, char ***l) {
struct kdbus_name_list *name_list;
struct kdbus_cmd_name *name;
- cmd = malloc0(sizeof(struct kdbus_cmd_name_list *));
+ cmd = malloc0(sizeof(struct kdbus_cmd_name_list));
if (!cmd)
return -ENOMEM;
+ cmd->size = sizeof(struct kdbus_cmd_name_list);
cmd->flags = KDBUS_NAME_LIST_UNIQUE | KDBUS_NAME_LIST_NAMES;
r = ioctl(sd_bus_get_fd(bus), KDBUS_CMD_NAME_LIST, cmd);