• Benjamin Berg's avatar
    print: Return sunk reference from deserialize function · 499de3e4
    Benjamin Berg authored
    This function was always documented to return a sunk reference, but it
    did not do so. This change is technically backward incompatible.
    However, it only has an effect if anything is doing a g_object_ref_sink.
    Which may happen inside libfprint itself. With the change, most API
    users (including fprintd) are fixed to do refcounting correctly. Any API
    user which worked around this will have a memory leak now.
    That is not ideal, but it is not really that bad overall. And returning
    a floating reference for FpPrint creation was a bad idea in the first
    place. And it really only makes sense for fp_print_new as the only
    (public) use case is to create the template for enrollment.
fp-print.c 24.4 KB