From: Francis Deslauriers Date: Wed, 29 Aug 2018 12:37:48 +0000 (-0400) Subject: Fix: invalid destruction of lookup_method X-Git-Tag: v2.11.0-rc1~38 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6bd61b9632ee566bcc7c274c07a9546c6852ab59;p=lttng-tools.git Fix: invalid destruction of lookup_method When passing the lookup_method to the location create function we give it the ownership of that structure. By setting our pointer to NULL, we make sure the _destroy function won't free it. Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/config/session-config.c b/src/common/config/session-config.c index 595e743b4..8e5410c3f 100644 --- a/src/common/config/session-config.c +++ b/src/common/config/session-config.c @@ -1633,6 +1633,7 @@ process_userspace_probe_tracepoint_attribute_node( lttng_userspace_probe_location_tracepoint_create( binary_path, provider_name, probe_name, lookup_method); + lookup_method = NULL; goto error; } }