This repository has been archived by the owner on Jun 27, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As device_id is a fixed size string, we don't even need to allocate it in the heap One way to check this bahaviour is running the light-server + light-scan/light-client-scan sample located in src/samples/flow/oic/. Use client scan to connect to different servers. Do it several times. After that closes the client. Leak information from compiler sanitizer: Direct leak of 64 byte(s) in 4 object(s) allocated from: #0 0x7fd5bbecf93a in __interceptor_malloc /build/gcc-multilib/src/gcc-5.2.0/libsanitizer/asan/asan_malloc_linux.cc:38 #1 0x7fd59dfa0a29 in hex_ascii_to_binary (//home/otavio/local/soletta/lib/soletta/modules//flow//oic.so+0x8a29) #2 0x7fd59dfa0bed in client_connect (//home/otavio/local/soletta/lib/soletta/modules//flow//oic.so+0x8bed) #3 0x7fd59dfa32df in device_id_process (//home/otavio/local/soletta/lib/soletta/modules//flow//oic.so+0xb2df) #4 0x7fd5bb51b2ca in dispatch_process (/home/otavio/local/soletta/lib/libsoletta.so.0+0x1a42ca) #5 0x7fd5bb51d282 in flow_send_do (/home/otavio/local/soletta/lib/libsoletta.so.0+0x1a6282) #6 0x7fd5bb51d7e1 in flow_send_idle (/home/otavio/local/soletta/lib/libsoletta.so.0+0x1a67e1) #7 0x7fd5bb494a46 in sol_mainloop_common_timeout_process (/home/otavio/local/soletta/lib/libsoletta.so.0+0x11da46) #8 0x7fd5bb499244 in sol_mainloop_impl_iter (/home/otavio/local/soletta/lib/libsoletta.so.0+0x122244) #9 0x7fd5bb496022 in sol_mainloop_impl_run (/home/otavio/local/soletta/lib/libsoletta.so.0+0x11f022) #10 0x7fd5bb499b74 in sol_run (/home/otavio/local/soletta/lib/libsoletta.so.0+0x122b74) #11 0x403a7a in main (/home/otavio/local/soletta/bin/sol-fbp-runner+0x403a7a) #12 0x7fd5b7df360f in __libc_start_main (/usr/lib/libc.so.6+0x2060f) Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7fd5bbecf93a in __interceptor_malloc /build/gcc-multilib/src/gcc-5.2.0/libsanitizer/asan/asan_malloc_linux.cc:38 #1 0x7fd59dfa0a29 in hex_ascii_to_binary (//home/otavio/local/soletta/lib/soletta/modules//flow//oic.so+0x8a29) #2 0x7fd59dfa0bed in client_connect (//home/otavio/local/soletta/lib/soletta/modules//flow//oic.so+0x8bed) #3 0x7fd59dfa32df in device_id_process (//home/otavio/local/soletta/lib/soletta/modules//flow//oic.so+0xb2df) #4 0x7fd5bb51b2ca in dispatch_process (/home/otavio/local/soletta/lib/libsoletta.so.0+0x1a42ca) #5 0x7fd5bb51d282 in flow_send_do (/home/otavio/local/soletta/lib/libsoletta.so.0+0x1a6282) #6 0x7fd5bb51d7e1 in flow_send_idle (/home/otavio/local/soletta/lib/libsoletta.so.0+0x1a67e1) #7 0x7fd5bb494a46 in sol_mainloop_common_timeout_process (/home/otavio/local/soletta/lib/libsoletta.so.0+0x11da46) #8 0x7fd5bb494e13 in sol_mainloop_common_idler_process (/home/otavio/local/soletta/lib/libsoletta.so.0+0x11de13) #9 0x7fd5bb499258 in sol_mainloop_impl_iter (/home/otavio/local/soletta/lib/libsoletta.so.0+0x122258) #10 0x7fd5bb496022 in sol_mainloop_impl_run (/home/otavio/local/soletta/lib/libsoletta.so.0+0x11f022) #11 0x7fd5bb499b74 in sol_run (/home/otavio/local/soletta/lib/libsoletta.so.0+0x122b74) #12 0x403a7a in main (/home/otavio/local/soletta/bin/sol-fbp-runner+0x403a7a) #13 0x7fd5b7df360f in __libc_start_main (/usr/lib/libc.so.6+0x2060f) Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
- Loading branch information