Fix: invalid destruction of lookup_method
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 29 Aug 2018 12:37:48 +0000 (08:37 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 29 Aug 2018 21:32:45 +0000 (17:32 -0400)
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 <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/config/session-config.c

index 595e743b45de0cc3de1e7a82de8b1a0d635e7bf7..8e5410c3f3b7971016e5f6e130f319703c8e997a 100644 (file)
@@ -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;
                }
        }
This page took 0.026549 seconds and 4 git commands to generate.