From: James Bowes <jbowes@dangerouslyinc.com>
To: junkio@cox.net
Cc: git@vger.kernel.org
Subject: [PATCH] use xmalloc in git.c and help.c
Date: Sun, 25 Mar 2007 20:39:36 -0400 [thread overview]
Message-ID: <11748695762499-git-send-email-jbowes@dangerouslyinc.com> (raw)
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
---
git.c | 2 +-
help.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git.c b/git.c
index ed1c65e..5b1bc2a 100644
--- a/git.c
+++ b/git.c
@@ -99,7 +99,7 @@ static int split_cmdline(char *cmdline, const char ***argv)
int src, dst, count = 0, size = 16;
char quoted = 0;
- *argv = malloc(sizeof(char*) * size);
+ *argv = xmalloc(sizeof(char*) * size);
/* split alias_string */
(*argv)[count++] = cmdline;
diff --git a/help.c b/help.c
index 0893fea..be8651a 100644
--- a/help.c
+++ b/help.c
@@ -58,7 +58,7 @@ static void add_cmdname(const char *name, int len)
if (!cmdname)
oom();
}
- ent = malloc(sizeof(*ent) + len);
+ ent = xmalloc(sizeof(*ent) + len);
if (!ent)
oom();
ent->len = len;
--
1.5.0.5
reply other threads:[~2007-03-26 0:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=11748695762499-git-send-email-jbowes@dangerouslyinc.com \
--to=jbowes@dangerouslyinc.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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 NNTP newsgroup(s).