diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2008-10-09 10:18:32 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-10-09 10:18:32 -0700 |
commit | 635536488c3efcf8495333b6a94e3e33c36fc055 (patch) | |
tree | dbe59109f95a57e008933d56ab28e72c7ae410ec /builtin-merge.c | |
parent | 749bc58c5eab5b6947d2c01e02d12320005eba99 (diff) | |
parent | 44c33a5b9603fba7c9556512a72e4e392ba4ae2d (diff) | |
download | git-635536488c3efcf8495333b6a94e3e33c36fc055.tar.gz |
Merge branch 'maint'
* maint:
builtin-apply: fix typo leading to stack corruption
git-stash.sh: fix flawed fix of invalid ref handling (commit da65e7c1)
builtin-merge.c: allocate correct amount of memory
Makefile: do not set NEEDS_LIBICONV for Solaris 8
rebase -i: remove leftover debugging
rebase -i: proper prepare-commit-msg hook argument when squashing
Diffstat (limited to 'builtin-merge.c')
-rw-r--r-- | builtin-merge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-merge.c b/builtin-merge.c index dcf8987782..fa7c95472c 100644 --- a/builtin-merge.c +++ b/builtin-merge.c @@ -722,12 +722,12 @@ static void add_strategies(const char *string, unsigned attr) static int merge_trivial(void) { unsigned char result_tree[20], result_commit[20]; - struct commit_list *parent = xmalloc(sizeof(struct commit_list *)); + struct commit_list *parent = xmalloc(sizeof(*parent)); write_tree_trivial(result_tree); printf("Wonderful.\n"); parent->item = lookup_commit(head); - parent->next = xmalloc(sizeof(struct commit_list *)); + parent->next = xmalloc(sizeof(*parent->next)); parent->next->item = remoteheads->item; parent->next->next = NULL; commit_tree(merge_msg.buf, result_tree, parent, result_commit, NULL); |