Skip to content

libsrtp has a memory leak - maybe test later version of library #2

@tinpotnick

Description

@tinpotnick

Example code

#include <srtp2/srtp.h>

int main( void ) {
  srtp_init();
  srtp_shutdown();
}

When built with -fsanitize=leak to detect leaks
Produces the output

=================================================================
==6920==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 520 byte(s) in 13 object(s) allocated from:
    #0 0x7f522de3c93f in __interceptor_malloc (/lib64/libasan.so.6+0xae93f)
    #1 0x7f5229c5f4c8  (/home/nick/workspace/projectrtp/src/build/Debug/test/projectrtp+0x5a74c8)

Indirect leak of 312 byte(s) in 13 object(s) allocated from:
    #0 0x7f522de3c93f in __interceptor_malloc (/lib64/libasan.so.6+0xae93f)
    #1 0x7f5229c5f119  (/home/nick/workspace/projectrtp/src/build/Debug/test/projectrtp+0x5a7119)

Indirect leak of 312 byte(s) in 13 object(s) allocated from:
    #0 0x7f522de3c93f in __interceptor_malloc (/lib64/libasan.so.6+0xae93f)
    #1 0x7f5229c5f489  (/home/nick/workspace/projectrtp/src/build/Debug/test/projectrtp+0x5a7489)

Indirect leak of 312 byte(s) in 13 object(s) allocated from:
    #0 0x7f522de3c93f in __interceptor_malloc (/lib64/libasan.so.6+0xae93f)
    #1 0x7f5229c5f479  (/home/nick/workspace/projectrtp/src/build/Debug/test/projectrtp+0x5a7479)

SUMMARY: AddressSanitizer: 1456 byte(s) leaked in 52 allocation(s).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions