Fix: using putenv() and free()-ing the value is invalid
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Nov 2017 23:18:03 +0000 (00:18 +0100)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Nov 2017 23:33:46 +0000 (00:33 +0100)
commit710509e664f62d71a215d5185e5bf89a6879672e
treec513bb98722f583dd32b65495b4ff9b5c418edc8
parent3c515f4d801e86fda78630aea2a4ec74454a3e5a
Fix: using putenv() and free()-ing the value is invalid

putenv() does not copy the string passed as the parameter. Hence,
free()-ing the string results in an invalid environment. In the
"good" case, we don't care since we execl().

However, on error, our process now has an invalid environment
which can cause breakage further down the line.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/main.c
This page took 0.025092 seconds and 4 git commands to generate.