mirror of
https://github.com/git/git
synced 2024-08-27 03:29:21 +00:00
Fix up some problems from the commit->tree helper patch
This commit is contained in:
parent
32347c3752
commit
860edf7a71
|
@ -174,7 +174,7 @@ void *read_tree_with_tree_or_commit_sha1(const unsigned char *sha1,
|
||||||
void *buffer;
|
void *buffer;
|
||||||
unsigned long isize;
|
unsigned long isize;
|
||||||
int was_commit = 0;
|
int was_commit = 0;
|
||||||
char tree_sha1[20];
|
unsigned char tree_sha1[20];
|
||||||
|
|
||||||
buffer = read_sha1_file(sha1, type, &isize);
|
buffer = read_sha1_file(sha1, type, &isize);
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ void *read_tree_with_tree_or_commit_sha1(const unsigned char *sha1,
|
||||||
*/
|
*/
|
||||||
if (!buffer || strcmp(type, "tree")) {
|
if (!buffer || strcmp(type, "tree")) {
|
||||||
free(buffer);
|
free(buffer);
|
||||||
return;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
*size = isize;
|
*size = isize;
|
||||||
|
|
Loading…
Reference in a new issue