summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2017-01-25 05:53:50 +0300
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-01-24 21:53:50 -0500
commit9b531f04fb16e072100b10b93613abe846140305 (patch)
treef47fb2732ef0aa37857168ae5fa32c0320b5416c
parentebc0a0b72c12d39caa8af3f3b315776db55119d4 (diff)
core: fix memleak in bus_exec_context_set_transient_property (#5143)
Fixes: ```sh systemd-run --property EnvironmentFile=/some/environment/file /bin/sleep 30 ``` ``` 23 bytes in 1 blocks are definitely lost in loss record 1 of 7 at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) by 0x4E85488: malloc_multiply (alloc-util.h:70) by 0x4E85F19: strjoin_real (string-util.c:252) by 0x1AF741: bus_exec_context_set_transient_property (dbus-execute.c:1418) by 0x1A907C: bus_service_set_property (dbus-service.c:330) by 0x1A66DD: bus_unit_set_properties (dbus-unit.c:1456) by 0x19CF93: transient_unit_from_message (dbus-manager.c:892) by 0x19D388: method_start_transient_unit (dbus-manager.c:980) by 0x4F60544: method_callbacks_run (bus-objects.c:418) by 0x4F62D9D: object_find_and_run (bus-objects.c:1255) by 0x4F633CE: bus_process_object (bus-objects.c:1371) by 0x4F2CE1D: process_message (sd-bus.c:2563) ``` Closes: #5142
-rw-r--r--src/core/dbus-execute.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
index 9960b7a811..3ae894d59c 100644
--- a/src/core/dbus-execute.c
+++ b/src/core/dbus-execute.c
@@ -1382,7 +1382,7 @@ int bus_exec_context_set_transient_property(
_cleanup_free_ char *joined = NULL;
_cleanup_fclose_ FILE *f = NULL;
- _cleanup_free_ char **l = NULL;
+ _cleanup_strv_free_ char **l = NULL;
size_t size = 0;
char **i;