From bbac207aa45994afed01cc8818c3d512f8fcfdb1 Mon Sep 17 00:00:00 2001 From: Zach Atkins Date: Mon, 14 Oct 2024 15:54:49 -0600 Subject: [PATCH] Fix memory leak --- backends/ref/ceed-ref-operator.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backends/ref/ceed-ref-operator.c b/backends/ref/ceed-ref-operator.c index b53aa14e80..4c62608d49 100644 --- a/backends/ref/ceed-ref-operator.c +++ b/backends/ref/ceed-ref-operator.c @@ -980,7 +980,11 @@ static inline int CeedOperatorOutputBasisAtPoints_Ref(CeedInt e, CeedInt num_poi } } // Restrict output block - if (skip_rstr[i]) continue; + if (skip_rstr[i]) { + CeedCallBackend(CeedElemRestrictionDestroy(&elem_rstr)); + continue; + } + // Get output vector CeedCallBackend(CeedElemRestrictionGetType(elem_rstr, &rstr_type)); CeedCallBackend(CeedOperatorFieldGetVector(op_output_fields[i], &vec));