From 877d62c2cb31105a72770f6d52330b4336c5f948 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Tue, 3 Jul 2018 18:14:53 +0100 Subject: [PATCH] nsgmls: Coverity 174584 --- cde/programs/nsgmls/parseSd.C | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cde/programs/nsgmls/parseSd.C b/cde/programs/nsgmls/parseSd.C index 4ed5c7a2..efd8532e 100644 --- a/cde/programs/nsgmls/parseSd.C +++ b/cde/programs/nsgmls/parseSd.C @@ -276,8 +276,10 @@ Boolean Parser::implySgmlDecl() else spec = &coreSyntax; CharSwitcher switcher; - if (!setStandardSyntax(*syntaxp, *spec, sd().docCharset(), switcher)) + if (!setStandardSyntax(*syntaxp, *spec, sd().docCharset(), switcher)) { + delete syntaxp; return 0; + } syntaxp->implySgmlChar(sd().docCharset()); for (int i = 0; i < Syntax::nQuantity; i++) syntaxp->setQuantity(i, options().quantity[i]); -- 2.25.1