From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: replace alloca with strdup
Date: Sun, 22 May 2005 05:15:56 -0400 [thread overview]
Message-ID: <E1DZmYu-0005cb-NC@fencepost.gnu.org> (raw)
In-Reply-To: <20050521163028.GM28212@boetes.org> (message from Han Boetes on Sat, 21 May 2005 18:30:06 +0200)
While looking at some compilerwarnings I found an alloca and an
strcpy.
What is wrong with that? I don't see any problem in it.
And I realized this can also be done as follows:
+ if ((error_msg = strdup(error_message)) == NULL)
+ errx(1, "Out of memory.");
This creates a memory leak.
prev parent reply other threads:[~2005-05-22 9:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-21 16:30 replace alloca with strdup Han Boetes
2005-05-21 17:07 ` Masatake YAMATO
2005-05-21 17:25 ` David Kastrup
2005-05-21 23:49 ` Andreas Schwab
2005-05-22 9:15 ` Richard Stallman [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1DZmYu-0005cb-NC@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).