Fix: command reply message is leaked for variable-len replies
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 6 Apr 2019 19:16:38 +0000 (15:16 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 24 Apr 2019 23:30:47 +0000 (19:30 -0400)
commit053e09364fd73a5c0d82a75d1f0fcccf36633f32
treea3cc62657d491d2387d08537f5fb1b5c89d280bf
parentdd1c9bfd055824630f661ea32d6c7261810bd3bc
Fix: command reply message is leaked for variable-len replies

Commands which return a variable-length payload re-setup the
command context using setup_lttng_msg() (and its wrappers).

In doing so, the lttcomm_lttng_msg structure (plus its trailing
variable-length payload) are re-allocated. However, the previous
instance of lttcomm_lttng_msg is leaked.

This is solved by free()-ing the original lttcomm_lttng_msg when
setup_lttng_msg() is used. When it is only used once, a NULL
pointer will be free'd without any effect.

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