• J
    object_array: add a "clear" function · 46be8231
    Jeff King 提交于
    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: NJeff King <peff@peff.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    46be8231
object.c 10.0 KB