From ac0ef893e48af99dc632adcdf21edd6a402327b3 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Mon, 9 Jan 2017 22:49:11 +0100 Subject: [PATCH] Fix memory leaks in operators returning relationals. These memory leaks were introduced in 82df71852. Thanks to Thomas Luthe for reporting this. --- ginac/operators.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ginac/operators.cpp b/ginac/operators.cpp index a6228e8d..3ce04ebc 100644 --- a/ginac/operators.cpp +++ b/ginac/operators.cpp @@ -247,32 +247,32 @@ const numeric operator--(numeric & lh, int) const relational operator==(const ex & lh, const ex & rh) { - return dynallocate(lh, rh, relational::equal); + return relational(lh, rh, relational::equal); } const relational operator!=(const ex & lh, const ex & rh) { - return dynallocate(lh, rh, relational::not_equal); + return relational(lh, rh, relational::not_equal); } const relational operator<(const ex & lh, const ex & rh) { - return dynallocate(lh, rh, relational::less); + return relational(lh, rh, relational::less); } const relational operator<=(const ex & lh, const ex & rh) { - return dynallocate(lh, rh, relational::less_or_equal); + return relational(lh, rh, relational::less_or_equal); } const relational operator>(const ex & lh, const ex & rh) { - return dynallocate(lh, rh, relational::greater); + return relational(lh, rh, relational::greater); } const relational operator>=(const ex & lh, const ex & rh) { - return dynallocate(lh, rh, relational::greater_or_equal); + return relational(lh, rh, relational::greater_or_equal); } // input/output stream operators and manipulators -- 2.49.0