From 4bfc06f9da121b0bc93a6c85fb9fd5380b1d2cab Mon Sep 17 00:00:00 2001 From: Jake Smith Date: Tue, 11 Jun 2024 12:26:24 +0100 Subject: [PATCH] HPCC-31993 Fix jptree hasProp leak Signed-off-by: Jake Smith --- system/jlib/jptree.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/system/jlib/jptree.cpp b/system/jlib/jptree.cpp index e9f19075d0a..c15302f35ea 100644 --- a/system/jlib/jptree.cpp +++ b/system/jlib/jptree.cpp @@ -1368,9 +1368,8 @@ bool PTree::hasProp(const char * xpath) const } else { - IPropertyTreeIterator *iter = getElements(xpath); + Owned iter = getElements(xpath); bool res = iter->first(); - iter->Release(); return res; } }