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:18:03 +0000 (00:18 +0100)
commitd222983eed2efddbd4a1380e23bc3f43edfc522e
treebdbec851cd6a2014e64c1f2fe94f4420cafc6642
parente9d6b496ff8c712366d235368fc547e64de13a8a
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.025557 seconds and 4 git commands to generate.