aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-08-03 14:34:59 -0400
committerJack Lloyd <[email protected]>2017-08-03 14:34:59 -0400
commit7cd7d7ed357888693910f8bf049cba8ca5054a7e (patch)
treebfb21e2c0619383ef21b8c9ac39c8ebd5841683c /src/lib/ffi
parent688a26799a8e1f8877997ece9532c0bb8513ac1a (diff)
Add virtual destructor to FFI botan_struct
As we do inherit from it, and delete through the base pointer. Found by Coverity scanner.
Diffstat (limited to 'src/lib/ffi')
-rw-r--r--src/lib/ffi/ffi_util.h2
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); }