From: Jérémie Galarneau Date: Thu, 30 Aug 2018 17:10:40 +0000 (-0400) Subject: Fix: uninitialized fd value used in runas X-Git-Tag: v2.11.0-rc1~22 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=ee5fcf1db868d61138af7a96f1037f7ca51e55ef Fix: uninitialized fd value used in runas Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/runas.c b/src/common/runas.c index 9fe6dcd58..317f68796 100644 --- a/src/common/runas.c +++ b/src/common/runas.c @@ -488,6 +488,9 @@ int handle_one_cmd(struct run_as_worker *worker) run_as_fct cmd; uid_t prev_euid; + memset(&sendret, 0, sizeof(sendret)); + sendret.fd = -1; + /* * Stage 1: Receive run_as_data struct from the master. * The structure contains the command type and all the parameters needed for