summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/test-bus-marshal.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-03-20 05:29:20 +0100
committerLennart Poettering <lennart@poettering.net>2013-03-20 23:00:10 +0100
commit80a46c7313b8fc4682881cb3a2ca9e4d743fcb2b (patch)
tree20ebf80690e694bf13eb484f7993e73c3328e5a5 /src/libsystemd-bus/test-bus-marshal.c
parent9a17484d986f6cb8828afdf911db425b574c63fd (diff)
bus: demarshal header fields properly
Diffstat (limited to 'src/libsystemd-bus/test-bus-marshal.c')
-rw-r--r--src/libsystemd-bus/test-bus-marshal.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsystemd-bus/test-bus-marshal.c b/src/libsystemd-bus/test-bus-marshal.c
index 9138f11172..15c472cca0 100644
--- a/src/libsystemd-bus/test-bus-marshal.c
+++ b/src/libsystemd-bus/test-bus-marshal.c
@@ -116,7 +116,12 @@ int main(int argc, char *argv[]) {
dbus_message_unref(w);
}
- free(buffer);
+ m = sd_bus_message_unref(m);
+
+ r = bus_message_from_malloc(buffer, sz, &m);
+ assert_se(r >= 0);
+
+ bus_message_dump(m);
assert_se(sd_bus_message_rewind(m, true) >= 0);