From: Francis Deslauriers Date: Tue, 28 Aug 2018 20:43:12 +0000 (-0400) Subject: Fix: use of uninitialized value in error path X-Git-Tag: v2.11.0-rc1~41 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=ec005ec6d2d9e72e44b6614a573114f03669f242 Fix: use of uninitialized value in error path Reported-by: Coverity (1395212) Uninitialized pointer read Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- 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