Skip to content

Possible MEMORY_LEAK in /falcosecurity/libs/blob/master/userspace/plugin/plugin_loader.c #2867

@guschin058

Description

@guschin058

The memory in line 143 is allocated via calloc and must be cleared using free() if api->get_required_api_version is NULL (line 153)
https://github.com/falcosecurity/libs/blob/master/userspace/plugin/plugin_loader.c#L143

plugin_handle_t* ret = (plugin_handle_t*)calloc(1, sizeof(plugin_handle_t));

https://github.com/falcosecurity/libs/blob/master/userspace/plugin/plugin_loader.c#L153

if(api->get_required_api_version == NULL) {
	strlcpy(err, "plugin_get_required_api_version symbol not implemented", PLUGIN_MAX_ERRLEN);
	return NULL;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions