Skip to content
Snippets Groups Projects
Commit 5b2fb5dd authored by godzie44's avatar godzie44 Committed by Dmitry Ivanov
Browse files

fix: use-after-free in `cbus_endpoint_delete`

Calling a `TRASH` macro after calling the `free`
function dereferences the pointer to the already
freed memory.

NO_DOC=picodata internal patch
NO_CHANGELOG=picodata internal patch
NO_TEST=picodata internal patch
parent 71d87e97
No related branches found
No related tags found
No related merge requests found
......@@ -443,8 +443,8 @@ int
cbus_endpoint_delete(struct cbus_endpoint *endpoint)
{
cbus_endpoint_destroy_inner(endpoint, cbus_process);
free(endpoint);
TRASH(endpoint);
free(endpoint);
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment