{"thread":{"id":"7399","subject":"[PATCH] use xmalloc in git.c and help.c","startedAt":"2007-03-26T00:39:36Z","lastAt":"2007-03-26T00:39:36Z","messageCount":1,"participants":["James Bowes"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"37979","messageId":"11748695762499-git-send-email-jbowes@dangerouslyinc.com","threadId":"7399","inReplyTo":null,"subject":"[PATCH] use xmalloc in git.c and help.c","fromName":"James Bowes","fromEmail":"jbowes@dangerouslyinc.com","sentAt":"2007-03-26T00:39:36Z","receivedAt":"2007-03-26T00:39:36Z","isPatch":true,"sender":{"key":"jbowes@dangerouslyinc.com","avatar":"https://gravatar.com/avatar/a2fe98c66b2b47a9fa9d2ba92ff949d54c3208b1f8acc2e745b4b84ae3c4483a?d=mp&s=160"},"body":"Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>\n---\n git.c  |    2 +-\n help.c |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git.c b/git.c\nindex ed1c65e..5b1bc2a 100644\n--- a/git.c\n+++ b/git.c\n@@ -99,7 +99,7 @@ static int split_cmdline(char *cmdline, const char ***argv)\n \tint src, dst, count = 0, size = 16;\n \tchar quoted = 0;\n \n-\t*argv = malloc(sizeof(char*) * size);\n+\t*argv = xmalloc(sizeof(char*) * size);\n \n \t/* split alias_string */\n \t(*argv)[count++] = cmdline;\ndiff --git a/help.c b/help.c\nindex 0893fea..be8651a 100644\n--- a/help.c\n+++ b/help.c\n@@ -58,7 +58,7 @@ static void add_cmdname(const char *name, int len)\n \t\tif (!cmdname)\n \t\t\toom();\n \t}\n-\tent = malloc(sizeof(*ent) + len);\n+\tent = xmalloc(sizeof(*ent) + len);\n \tif (!ent)\n \t\toom();\n \tent->len = len;\n-- \n1.5.0.5\n"}]}