From: Peter Howkins Date: Tue, 3 Jul 2018 17:14:53 +0000 (+0100) Subject: nsgmls: Coverity 174584 X-Git-Tag: 2.3.0a~237 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=877d62c2cb31105a72770f6d52330b4336c5f948;p=oweals%2Fcde.git nsgmls: Coverity 174584 --- 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]);