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
This commit is contained in:
Junio C Hamano
2021-11-12 15:29:25 -08:00
3 changed files with 12 additions and 4 deletions

View File

@ -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 */