diff options
author | Jonas Fonseca <fonseca@diku.dk> | 2006-09-01 00:32:39 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-31 16:24:39 -0700 |
commit | 2d7320d0b09d7a9aab4e5dbc5458f37bfb6ce9f5 (patch) | |
tree | 4fac98b5cb3155365498f5750f9550be977660ed /config.c | |
parent | ef1186228d39af29c109785fa752e3866c79a6b3 (diff) | |
download | git-2d7320d0b09d7a9aab4e5dbc5458f37bfb6ce9f5.tar.gz |
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 'config.c')
-rw-r--r-- | config.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -565,7 +565,7 @@ int git_config_set_multivar(const char* key, const char* value, /* * Validate the key and while at it, lower case it for matching. */ - store.key = (char*)malloc(strlen(key)+1); + store.key = xmalloc(strlen(key) + 1); dot = 0; for (i = 0; key[i]; i++) { unsigned char c = key[i]; @@ -633,7 +633,7 @@ int git_config_set_multivar(const char* key, const char* value, } else store.do_not_match = 0; - store.value_regex = (regex_t*)malloc(sizeof(regex_t)); + store.value_regex = (regex_t*)xmalloc(sizeof(regex_t)); if (regcomp(store.value_regex, value_regex, REG_EXTENDED)) { fprintf(stderr, "Invalid pattern: %s\n", |