After adding a trigger, ASan reports this when exiting the sessiond:
Direct leak of 128 byte(s) in 1 object(s) allocated from:
#0 0x7ffff767783a in __interceptor_realloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:164
#1 0x55555579a415 in lttng_dynamic_buffer_set_capacity /home/simark/src/lttng-tools/src/common/dynamic-buffer.c:166
#2 0x55555579a1df in lttng_dynamic_buffer_set_size /home/simark/src/lttng-tools/src/common/dynamic-buffer.c:118
#3 0x5555556d3cc1 in receive_lttng_trigger /home/simark/src/lttng-tools/src/bin/lttng-sessiond/client.c:712
#4 0x5555556dba46 in process_client_msg /home/simark/src/lttng-tools/src/bin/lttng-sessiond/client.c:2154
#5 0x5555556deef7 in thread_manage_clients /home/simark/src/lttng-tools/src/bin/lttng-sessiond/client.c:2601
#6 0x5555556c8a83 in launch_thread /home/simark/src/lttng-tools/src/bin/lttng-sessiond/thread.c:66
#7 0x7ffff714c298 in start_thread (/usr/lib/libpthread.so.0+0x9298)
It seems like we don't free the payload in receive_lttng_trigger, fix
that.
Change-Id: Ie9bc3bad24fb55b98c8232c0cd63483a3e94bfb0
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
ret_code = LTTNG_OK;
end:
+ lttng_payload_reset(&trigger_payload);
return ret_code;
}