public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: C Howland <cc1964t@gmail.com>
To: newlib@sourceware.org
Subject: Re: Fw: makedoc.c: Coverity Scan Issues
Date: Thu, 17 Jun 2021 14:28:40 -0400	[thread overview]
Message-ID: <CANk6obQ++XtkOc8f9h5fb76Btq-Eq+xXLzkTVXmpQyfDdmoyqQ@mail.gmail.com> (raw)
In-Reply-To: <BN3P110MB05635FBA2AA46EEA2E677F7D9A0E9@BN3P110MB0563.NAMP110.PROD.OUTLOOK.COM>

>
> ------------------------------
> *From:* Newlib <newlib-bounces+craig.howland=caci.com@sourceware.org> on
> behalf of Joel Sherrill <joel@rtems.org>
> *Sent:* Thursday, June 17, 2021 2:06 PM
> *To:* Newlib <newlib@sourceware.org>
> *Subject:* makedoc.c: Coverity Scan Issues
>
>
> Hi
>
> Scan reports 3 issues in makedoc.c.
>
>   One  is a memory leak around lines 1202 to 1282 because the variable word
> holds memory allocated inside nextword. The method returns without freeing
> the memory.    I think adding a free() is sufficient for this.
>
> The others are from calling realloc() and not checking for NULL around line
> 137. Is checking for the NULL, printing a message, and exit(1), an OK thing
> to do here?
>
> Yes, that sounds good.  (Seems very unlikely it would ever happen, anyway.)
Craig

> Thanks.
>
> --joel
>
>
>

  parent reply	other threads:[~2021-06-17 18:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 18:06 Joel Sherrill
     [not found] ` <BN3P110MB05635FBA2AA46EEA2E677F7D9A0E9@BN3P110MB0563.NAMP110.PROD.OUTLOOK.COM>
2021-06-17 18:28   ` C Howland [this message]
2021-06-17 18:36     ` Fw: " Joel Sherrill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANk6obQ++XtkOc8f9h5fb76Btq-Eq+xXLzkTVXmpQyfDdmoyqQ@mail.gmail.com \
    --to=cc1964t@gmail.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).