Clean-up: location lookup destroy can be type-agnostic
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 27 Aug 2018 20:30:03 +0000 (16:30 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 27 Aug 2018 20:30:03 +0000 (16:30 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/userspace-probe.c

index 89066bf0549a553df0564528d450a7763910ccc0..ac26a0c47411790b2a130067bcfe4821c1c73a1a 100644 (file)
@@ -38,26 +38,7 @@ void lttng_userspace_probe_location_lookup_method_destroy(
                return;
        }
 
-       switch (lookup_method->type) {
-       case LTTNG_USERSPACE_PROBE_LOCATION_LOOKUP_METHOD_TYPE_FUNCTION_ELF:
-       {
-               struct lttng_userspace_probe_location_lookup_method_elf *elf_method =
-                       container_of(lookup_method,
-                               struct lttng_userspace_probe_location_lookup_method_elf, parent);
-               free(elf_method);
-               break;
-       }
-       case LTTNG_USERSPACE_PROBE_LOCATION_LOOKUP_METHOD_TYPE_TRACEPOINT_SDT:
-       {
-               struct lttng_userspace_probe_location_lookup_method_sdt *sdt_method =
-                       container_of(lookup_method,
-                               struct lttng_userspace_probe_location_lookup_method_sdt, parent);
-               free(sdt_method);
-               break;
-       }
-       default:
-               break;
-       }
+       free(lookup_method);
 }
 
 struct lttng_userspace_probe_location_lookup_method *
This page took 0.02623 seconds and 4 git commands to generate.