diff options
author | René Scharfe <l.s.r@web.de> | 2016-08-13 14:09:49 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-13 19:47:49 -0700 |
commit | c089320cf616d7817a0662d3963ae8ea0c4bc62d (patch) | |
tree | 01a1041dc85d2421d2ec7ffaa675533fd4f648dc | |
parent | e0c1ceafc5bece92d35773a75fff59497e1d9bd5 (diff) | |
download | git-c089320cf616d7817a0662d3963ae8ea0c4bc62d.tar.gz |
commit: use xstrdup() in get_merge_parent()
Handle allocation errors for the name member just like we already do
for the struct merge_remote_desc itself.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | commit.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1589,7 +1589,7 @@ struct commit *get_merge_parent(const char *name) struct merge_remote_desc *desc; desc = xmalloc(sizeof(*desc)); desc->obj = obj; - desc->name = strdup(name); + desc->name = xstrdup(name); commit->util = desc; } return commit; |