Fix: returned pids may be uninitialized
[lttng-tools.git] / src / lib / lttng-ctl / lttng-ctl.c
index c79cc6dd59eb251a7b5c237b1dd7e4c4108dcbe3..eff08df80ee937c46177765bf518f739a1d5d2a7 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
@@ -2719,7 +2722,7 @@ int lttng_list_tracker_pids(struct lttng_handle *handle,
        int enabled = 1;
        struct lttcomm_session_msg lsm;
        size_t nr_pids;
-       int32_t *pids;
+       int32_t *pids = NULL;
 
        if (handle == NULL) {
                return -LTTNG_ERR_INVALID;
This page took 0.026783 seconds and 5 git commands to generate.