public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Joel Sherrill <joel@rtems.org>
To: newlib@sourceware.org
Subject: [PATCH 1/2] newlib/doc/makedoc.c: Fix memory leak identified by Coverity.
Date: Thu, 17 Jun 2021 16:53:29 -0500	[thread overview]
Message-ID: <20210617215330.24276-1-joel@rtems.org> (raw)

---
 newlib/doc/makedoc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/newlib/doc/makedoc.c b/newlib/doc/makedoc.c
index 36a14e535..966349c51 100644
--- a/newlib/doc/makedoc.c
+++ b/newlib/doc/makedoc.c
@@ -1278,7 +1278,8 @@ compile (char *string)
 	}	    
     }
 
-return(ret);
+    free(word);
+    return(ret);
 }
 
  
-- 
2.24.4


             reply	other threads:[~2021-06-17 21:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 21:53 Joel Sherrill [this message]
2021-06-17 21:53 ` [PATCH 2/2] newlib/doc/makedoc.c: if realloc() fails, exit with an error message 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=20210617215330.24276-1-joel@rtems.org \
    --to=joel@rtems.org \
    --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).