Skip to content

Memory leak in ettercap, ec_globals_alloc, src/ec_globals.c #1201

@5hadowblad3

Description

@5hadowblad3

Hi, there.

There is a memory leak in ettercap in the newest main branch (8e1d6d8).

To reproduce, compile with

CFLAGS="-g -fsanitize=address"

then run:

./src/ettercap

Here is the trace reported by ASAN:

==1812145==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 80 byte(s) in 1 object(s) allocated from:
    #0 0x4c3b37 in calloc  /dependence/llvm11/llvm-11.0.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:154:3
    #1 0x7f980abdabe3 in ec_globals_alloc  /benchmark/ettercap/src/ec_globals.c:46:4

Direct leak of 56 byte(s) in 1 object(s) allocated from:
    #0 0x4c3b37 in calloc  /dependence/llvm11/llvm-11.0.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:154:3
    #1 0x7f980abdb06c in ec_globals_alloc  /benchmark/ettercap/src/ec_globals.c:55:4

SUMMARY: AddressSanitizer: 136 byte(s) leaked in 2 allocation(s).
Aborted

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions