• Junio C Hamano's avatar
    add_to_index(): free unused cache-entry · 067178ed
    Junio C Hamano authored
    We allocate a cache-entry pretty early in the function and then
    decide either not to do anything when we are pretending to add, or
    add it and then get an error (another possibility is obviously to
    succeed).
    
    When pretending or failing to add, we forgot to free the
    cache-entry.
    
    Noticed during a discussion on Stefan's patch to change the coding
    style without fixing the issue ;-)
    Signed-off-by: default avatarJunio C Hamano <[email protected]>
    067178ed
read-cache.c 61.1 KB