Reproducer:
lttng-sessiond \
--consumerd32-path=/usr/local/lib/lttng/libexec/lttng-consumerd \
--consumerd64-path=/usr/local/lib/lttng/libexec/lttng-consumerd
lttng create
lttng enable-event -u -a
On a 64bit machine the invocation of the 64bit consumerd will not fail
since its libdir is populated by sessiond_config_init but will segfault on
spawning of the 32 bit consumerd when performing the check of libdir
value.
On a 32bit machine the opposite will happen.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- if (config.consumerd64_lib_dir.value[0] != '\0') {
+ if (config.consumerd64_lib_dir.value) {
char *tmp;
size_t tmplen;
char *tmp;
size_t tmplen;
"--consumerd-err-sock", consumer_data->err_unix_sock_path,
"--group", config.tracing_group_name.value,
NULL);
"--consumerd-err-sock", consumer_data->err_unix_sock_path,
"--group", config.tracing_group_name.value,
NULL);
- if (config.consumerd64_lib_dir.value[0] != '\0') {
- free(tmpnew);
- }
break;
}
case LTTNG_CONSUMER32_UST:
{
char *tmpnew = NULL;
break;
}
case LTTNG_CONSUMER32_UST:
{
char *tmpnew = NULL;
- if (config.consumerd32_lib_dir.value[0] != '\0') {
+ if (config.consumerd32_lib_dir.value) {
char *tmp;
size_t tmplen;
char *tmp;
size_t tmplen;
"--consumerd-err-sock", consumer_data->err_unix_sock_path,
"--group", config.tracing_group_name.value,
NULL);
"--consumerd-err-sock", consumer_data->err_unix_sock_path,
"--group", config.tracing_group_name.value,
NULL);
- if (config.consumerd32_lib_dir.value[0] != '\0') {
- free(tmpnew);
- }