Fix: use of uninitialized value in error path
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 28 Aug 2018 20:43:12 +0000 (16:43 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 29 Aug 2018 21:32:45 +0000 (17:32 -0400)
Reported-by: Coverity (1395212) Uninitialized pointer read
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/lib/lttng-ctl/lttng-ctl.c

index c79cc6dd59eb251a7b5c237b1dd7e4c4108dcbe3..0dd12b26f3222584e2b53703a37364ce76c2dcb4 100644 (file)
@@ -1033,6 +1033,9 @@ int lttng_enable_event_with_exclusions(struct lttng_handle *handle,
        bool send_fd = false;
        unsigned int free_filter_expression = 0;
        struct filter_parser_ctx *ctx = NULL;
+
+       memset(&send_buffer, 0, sizeof(send_buffer));
+
        /*
         * Cast as non-const since we may replace the filter expression
         * by a dynamically allocated string. Otherwise, the original
This page took 0.026045 seconds and 4 git commands to generate.