From: Mathieu Desnoyers Date: Wed, 17 Mar 2021 19:23:26 +0000 (-0400) Subject: Fix: lttng_ust_destroy_type: add missing free() for compound types X-Git-Tag: v2.13.0-rc1~258 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=a9d86fd1c36a680eac282bd982896f78631af3ab;hp=3d66e98ccd82d099ae3da070c2273b8cce294ab7;p=lttng-ust.git Fix: lttng_ust_destroy_type: add missing free() for compound types Signed-off-by: Mathieu Desnoyers Change-Id: Iea05b0cad779adef251ec000e4c126493e17aff8 --- diff --git a/liblttng-ust/ust-events-internal.h b/liblttng-ust/ust-events-internal.h index 5466f25e..e9f14fc4 100644 --- a/liblttng-ust/ust-events-internal.h +++ b/liblttng-ust/ust-events-internal.h @@ -466,6 +466,7 @@ void lttng_ust_destroy_type(struct lttng_ust_type_common *type) struct lttng_ust_type_enum *enum_type = (struct lttng_ust_type_enum *) type; lttng_ust_destroy_type(enum_type->container_type); + free(enum_type); break; } case lttng_ust_type_array: @@ -473,6 +474,7 @@ void lttng_ust_destroy_type(struct lttng_ust_type_common *type) struct lttng_ust_type_array *array_type = (struct lttng_ust_type_array *) type; lttng_ust_destroy_type(array_type->elem_type); + free(array_type); break; } case lttng_ust_type_sequence: @@ -480,6 +482,7 @@ void lttng_ust_destroy_type(struct lttng_ust_type_common *type) struct lttng_ust_type_sequence *sequence_type = (struct lttng_ust_type_sequence *) type; lttng_ust_destroy_type(sequence_type->elem_type); + free(sequence_type); break; } case lttng_ust_type_struct: @@ -489,6 +492,7 @@ void lttng_ust_destroy_type(struct lttng_ust_type_common *type) for (i = 0; i < struct_type->nr_fields; i++) lttng_ust_destroy_type(struct_type->fields[i]->type); + free(struct_type); break; } default: