733aaf sd-bus: unify three code-paths which free struct bus_container

2 files Authored by Zbigniew Jędrzejewski-Szmek 4 years ago, Committed by Packit Service 4 years ago,
    sd-bus: unify three code-paths which free struct bus_container
    
    We didn't free one of the fields in two of the places.
    
    $ valgrind --show-leak-kinds=all --leak-check=full \
      build/fuzz-bus-message \
      test/fuzz/fuzz-bus-message/leak-c09c0e2256d43bc5e2d02748c8d8760e7bc25d20
    ...
    ==14457== HEAP SUMMARY:
    ==14457==     in use at exit: 3 bytes in 1 blocks
    ==14457==   total heap usage: 509 allocs, 508 frees, 51,016 bytes allocated
    ==14457==
    ==14457== 3 bytes in 1 blocks are definitely lost in loss record 1 of 1
    ==14457==    at 0x4C2EBAB: malloc (vg_replace_malloc.c:299)
    ==14457==    by 0x53AFE79: strndup (in /usr/lib64/libc-2.27.so)
    ==14457==    by 0x4F52EB8: free_and_strndup (string-util.c:1039)
    ==14457==    by 0x4F8E1AB: sd_bus_message_peek_type (bus-message.c:4193)
    ==14457==    by 0x4F76CB5: bus_message_dump (bus-dump.c:144)
    ==14457==    by 0x108F12: LLVMFuzzerTestOneInput (fuzz-bus-message.c:24)
    ==14457==    by 0x1090F7: main (fuzz-main.c:34)
    ==14457==
    ==14457== LEAK SUMMARY:
    ==14457==    definitely lost: 3 bytes in 1 blocks
    
    (cherry picked from commit 6d1e0f4fcba8d6f425da3dc91805db95399b3c8b)
    Resolves: #1635435
    
    patch_name: 0046-sd-bus-unify-three-code-paths-which-free-struct-bus_.patch
    present_in_specfile: true
    location_in_specfile: 46
    squash_commits: true