ca50c40 sbus: replace sbus_message_bound_ref with sbus_message_bound_steal

10 files Authored by pbrezina 5 years ago, Committed by jhrozek 5 years ago,
    sbus: replace sbus_message_bound_ref with sbus_message_bound_steal
    
    The memory context used to new message reference accidentally overwrote
    the one use by the initial sbus_message_bound call. This caused a memory
    leak of message as its reference counter got increased but number of
    talloc contexts bound this this message decreased at the same time.
    
    Fixing this is non-trival and it would require separate data slot for
    each reference. Because we do not have any existing use case for this
    and we use it only as an equivalent of talloc_steal it is better to
    provide a real equivalent for this talloc function.
    
    Resolves:
    https://pagure.io/SSSD/sssd/issue/3810
    
    Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
    
        
file modified
+41 -10
file modified
+2 -6