On Sat, Feb 25, 2017 at 11:02:28AM +0100, René Scharfe wrote: > If a pack entry that's used as a delta base is corrupt, unpack_entry() > marks it as unusable and then searches the object again in the hope that > it can be found in another pack or in a loose file. The memory for this > external base object is never released. Free it after use. This looks good. I wondered if there were any tricks with passing the resulting base to the delta-base cache. But I don't think so. We add to the cache right _before_ the fallback check we're looking at here. And the "base" variable does not persist to the next loop. Arguably, one could do the fallback first and then add the result to the delta base cache, but it probably isn't worth the trouble. However we read the object via read_object() would hopefully have done so already. -Peff