diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-11-12 15:29:25 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-11-12 15:29:25 -0800 |
commit | 2c0fa66bc81a0725cd65fda69640552361536e50 (patch) | |
tree | f93b70f2b4e240265c1660a3140c31b803a017fc /object-file.c | |
parent | 8996d68ac7052bf96a38a2b36546c4239280279e (diff) | |
parent | 16235e3b1460ddd708995b4cc5028e49d47e3761 (diff) | |
download | git-2c0fa66bc81a0725cd65fda69640552361536e50.tar.gz |
Merge branch 'ab/fsck-unexpected-type'
Regression fix.
* ab/fsck-unexpected-type:
object-file: free(*contents) only in read_loose_object() caller
object-file: fix SEGV on free() regression in v2.34.0-rc2
Diffstat (limited to 'object-file.c')
-rw-r--r-- | object-file.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/object-file.c b/object-file.c index 02b7970274..c3d866a287 100644 --- a/object-file.c +++ b/object-file.c @@ -2557,10 +2557,9 @@ int read_loose_object(const char *path, goto out; } if (check_object_signature(the_repository, expected_oid, - *contents, *size, oi->type_name->buf, real_oid)) { - free(*contents); + *contents, *size, + oi->type_name->buf, real_oid)) goto out; - } } ret = 0; /* everything checks out */ |