From ec005ec6d2d9e72e44b6614a573114f03669f242 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Tue, 28 Aug 2018 16:43:12 -0400 Subject: [PATCH] Fix: use of uninitialized value in error path MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported-by: Coverity (1395212) Uninitialized pointer read Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- src/lib/lttng-ctl/lttng-ctl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index c79cc6dd5..0dd12b26f 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -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 -- 2.34.1