Skip to content
  • Jeff King's avatar
    object_array: add a "clear" function · 46be8231
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    There's currently no easy way to free the memory associated
    with an object_array (and in most cases, we simply leak the
    memory in a rev_info's pending array). Let's provide a
    helper to make this easier to handle.
    
    We can make use of it in list-objects.c, which does the same
    thing by hand (but fails to free the "name" field of each
    entry, potentially leaking memory).
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    46be8231