From afa19c4d668bb28d9538567110bc4261582c7b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20K=2E=20Guti=C3=A9rrez?= Date: Fri, 24 May 2024 13:24:07 -0600 Subject: [PATCH] Add qvi_zgroup_free(). (#161) Signed-off-by: Samuel K. Gutierrez --- src/qvi-context.h | 2 +- src/qvi-zgroup.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/qvi-context.h b/src/qvi-context.h index 58d649d..3e98c4e 100644 --- a/src/qvi-context.h +++ b/src/qvi-context.h @@ -48,8 +48,8 @@ struct qv_context_s { ~qv_context_s(void) { qvi_bind_stack_free(&bind_stack); + qvi_zgroup_free(&zgroup); qvi_rmi_client_free(&rmi); - delete zgroup; } }; diff --git a/src/qvi-zgroup.h b/src/qvi-zgroup.h index 099490c..6046131 100644 --- a/src/qvi-zgroup.h +++ b/src/qvi-zgroup.h @@ -23,6 +23,7 @@ #include "qvi-common.h" // IWYU pragma: keep #include "qvi-task.h" #include "qvi-group.h" +#include "qvi-utils.h" /** * Virtual base zgroup class. @@ -44,6 +45,13 @@ struct qvi_zgroup_s { }; typedef qvi_zgroup_s qvi_zgroup_t; +static inline void +qvi_zgroup_free( + qvi_zgroup_t **zgroup +) { + qvi_delete(zgroup); +} + #endif /*