diff options
author | Jack Lloyd <[email protected]> | 2017-08-03 14:34:59 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-08-03 14:34:59 -0400 |
commit | 7cd7d7ed357888693910f8bf049cba8ca5054a7e (patch) | |
tree | bfb21e2c0619383ef21b8c9ac39c8ebd5841683c | |
parent | 688a26799a8e1f8877997ece9532c0bb8513ac1a (diff) |
Add virtual destructor to FFI botan_struct
As we do inherit from it, and delete through the base pointer.
Found by Coverity scanner.
-rw-r--r-- | src/lib/ffi/ffi_util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ffi/ffi_util.h b/src/lib/ffi/ffi_util.h index 919efdd75..883c1146c 100644 --- a/src/lib/ffi/ffi_util.h +++ b/src/lib/ffi/ffi_util.h @@ -29,7 +29,7 @@ struct botan_struct { public: botan_struct(T* obj) : m_magic(MAGIC), m_obj(obj) {} - ~botan_struct() { m_magic = 0; m_obj.reset(); } + virtual ~botan_struct() { m_magic = 0; m_obj.reset(); } bool magic_ok() const { return (m_magic == MAGIC); } |