diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-28 10:18:39 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-28 10:18:40 +0900 |
commit | fd052e4f9abc2cf9ea54ea33e2b563c0e120a795 (patch) | |
tree | 8f1ecc70d6d5a5af912526abb2fdf710963ef2a2 /path.c | |
parent | 2d8f12d28273487b620cbd796560bc284feeffda (diff) | |
parent | 55d7d15847e84d531f712f9fd6a7117283b208a3 (diff) | |
download | git-fd052e4f9abc2cf9ea54ea33e2b563c0e120a795.tar.gz |
Merge branch 'ao/path-use-xmalloc'
A possible oom error is now caught as a fatal error, instead of
continuing and dereferencing NULL.
* ao/path-use-xmalloc:
path.c: use xmalloc() in add_to_trie()
Diffstat (limited to 'path.c')
-rw-r--r-- | path.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -192,7 +192,7 @@ static void *add_to_trie(struct trie *root, const char *key, void *value) * Split this node: child will contain this node's * existing children. */ - child = malloc(sizeof(*child)); + child = xmalloc(sizeof(*child)); memcpy(child->children, root->children, sizeof(root->children)); child->len = root->len - i - 1; |