OpenKMIP / libkmip

A C implementation of the KMIP specification.
Other
38 stars 25 forks source link

Fix and prevent a null pointer dereference on operation failure #32

Closed PeterHamilton closed 4 years ago

PeterHamilton commented 4 years ago

This change fixes and prevents a possible null pointer dereference in the Create API functions, when the memory for the unique identifier is referenced before confirming that the Create operation succeeded. Additional memory freeing calls are made to ensure that the response message structure that gets decoded in all API functions is properly freed when errors occur.

Fixes #30