From 41e4553280817ce013bcc00b39caff39a97a9039 Mon Sep 17 00:00:00 2001 From: PeiYong Zhang <peiyongz@apache.org> Date: Mon, 10 Dec 2001 22:13:21 +0000 Subject: [PATCH] swap checking to avoid "dangling pointer" reported by BoundsChecker git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@173369 13f79535-47bb-0310-9956-ffa450edef68 --- .../datatype/AbstractNumericFacetValidator.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/validators/datatype/AbstractNumericFacetValidator.cpp b/src/validators/datatype/AbstractNumericFacetValidator.cpp index de373a960..93056259b 100644 --- a/src/validators/datatype/AbstractNumericFacetValidator.cpp +++ b/src/validators/datatype/AbstractNumericFacetValidator.cpp @@ -57,6 +57,9 @@ /* * $Id$ * $Log$ + * Revision 1.5 2001/12/10 22:13:21 peiyongz + * swap checking to avoid "dangling pointer" reported by BoundsChecker + * * Revision 1.4 2001/11/12 20:37:57 peiyongz * SchemaDateTimeException defined * @@ -116,16 +119,16 @@ const int AbstractNumericFacetValidator::INDETERMINATE = 2; // --------------------------------------------------------------------------- AbstractNumericFacetValidator::~AbstractNumericFacetValidator() { - if (fMaxInclusive && !fMaxInclusiveInherited) + if (!fMaxInclusiveInherited && fMaxInclusive) delete fMaxInclusive; - if (fMaxExclusive && !fMaxExclusiveInherited) + if (!fMaxExclusiveInherited && fMaxExclusive) delete fMaxExclusive; - if (fMinInclusive && !fMinInclusiveInherited) + if (!fMinInclusiveInherited && fMinInclusive) delete fMinInclusive; - if (fMinExclusive && !fMinExclusiveInherited) + if (!fMinExclusiveInherited && fMinExclusive) delete fMinExclusive; //~RefVectorOf will delete all adopted elements -- GitLab