aboutsummaryrefslogtreecommitdiff
path: root/builtin-repo-config.c
diff options
context:
space:
mode:
authorJonas Fonseca <fonseca@diku.dk>2006-09-01 00:32:39 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-31 16:24:39 -0700
commit2d7320d0b09d7a9aab4e5dbc5458f37bfb6ce9f5 (patch)
tree4fac98b5cb3155365498f5750f9550be977660ed /builtin-repo-config.c
parentef1186228d39af29c109785fa752e3866c79a6b3 (diff)
downloadgit-2d7320d0b09d7a9aab4e5dbc5458f37bfb6ce9f5.tar.gz
git-2d7320d0b09d7a9aab4e5dbc5458f37bfb6ce9f5.tar.xz
Use xmalloc instead of malloc
Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-repo-config.c')
-rw-r--r--builtin-repo-config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-repo-config.c b/builtin-repo-config.c
index 6560cf1c2..a1756c858 100644
--- a/builtin-repo-config.c
+++ b/builtin-repo-config.c
@@ -84,7 +84,7 @@ static int get_value(const char* key_, const char* regex_)
*tl = tolower(*tl);
if (use_key_regexp) {
- key_regexp = (regex_t*)malloc(sizeof(regex_t));
+ key_regexp = (regex_t*)xmalloc(sizeof(regex_t));
if (regcomp(key_regexp, key, REG_EXTENDED)) {
fprintf(stderr, "Invalid key pattern: %s\n", key_);
goto free_strings;
@@ -97,7 +97,7 @@ static int get_value(const char* key_, const char* regex_)
regex_++;
}
- regexp = (regex_t*)malloc(sizeof(regex_t));
+ regexp = (regex_t*)xmalloc(sizeof(regex_t));
if (regcomp(regexp, regex_, REG_EXTENDED)) {
fprintf(stderr, "Invalid pattern: %s\n", regex_);
goto free_strings;