Skip to content

[BUG] Memory Leak vulnerability in src/data.c #2654

@shiyujunz

Description

@shiyujunz

Hi, I have found a potential memory leak bug in src/data.c and would like to report it to the maintainers. Can you please help me to check it? Thank you for your effort and patience!

Below is the execution sequence of the program that may produce the bug.
First, in the file src/utils.c, the function xrealloc_location allocates memory on line 38.
Second, in file src/data.c, function load_data_swag calls macro xcalloc on line 822, which actually calls function xcalloc_location to allocate memory for d.X.vals.
Third, in the file src/data.c, the function load_thread calls the function load_data_swag on line 1588 to allocate memory for a.d.X.vals, but the function returns directly on line 1601 without freeing a.d.X.vals, which can lead to a memory leak vulnerability

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions