Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

dps-micro tries to free a static variable when destroying a node #129

Open
marklocascio opened this issue Apr 16, 2021 · 0 comments
Open

Comments

@marklocascio
Copy link

The dps-micro DPS_CreateKeyStore() method is called by DPS_CreateNode(). DPS_CreateKeyStore() creates a static variable for the keystore and returns a pointer to it. Then, when we destroy the node, we call DPS_DestroyKeyStore() and try to free various parts of the static keystore. This can (will?) segfault on some (all?) systems.

We could allocate the keystore on the heap instead, or if it needs to be static, we can reinitialize the keystore to zero when destroying it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant