varlink / libvarlink

C implementation of the Varlink protocol and command line tool
Apache License 2.0
111 stars 15 forks source link

There seems to be a memory leak #51

Closed evverx closed 1 year ago

evverx commented 2 years ago
git describe
22-6-g5bb62f6
printf '{"":0,"":1}}\0' | ./build/tool/varlink bridge

=================================================================
==1474995==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x7fb5f4c158f7 in strdup (/lib64/libasan.so.6+0x598f7)
    #1 0x427bb4 in object_add_field ../lib/object.c:48
    #2 0x4284d2 in varlink_object_new_from_scanner ../lib/object.c:115
    #3 0x4289c6 in varlink_object_new_from_json ../lib/object.c:153
    #4 0x434a35 in varlink_stream_read ../lib/stream.c:229
    #5 0x40b67b in handleBridge ../tool/command-bridge.c:147
    #6 0x40cfa5 in bridge_run ../tool/command-bridge.c:339
    #7 0x4079c9 in cli_run ../tool/cli.c:496
    #8 0x41450c in main ../tool/main.c:14
    #9 0x7fb5f408443f in __libc_start_call_main (/lib64/libc.so.6+0x4043f)

SUMMARY: AddressSanitizer: 1 byte(s) leaked in 1 allocation(s).