aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/ffi/ffi.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp
index 8d96a0fc7..625b1947b 100644
--- a/src/lib/ffi/ffi.cpp
+++ b/src/lib/ffi/ffi.cpp
@@ -912,6 +912,8 @@ int botan_pk_op_encrypt_create(botan_pk_op_encrypt_t* op,
{
BOTAN_ASSERT_NONNULL(op);
+ *op = nullptr;
+
if(flags != 0)
return BOTAN_FFI_ERROR_BAD_FLAG;
@@ -955,6 +957,8 @@ int botan_pk_op_decrypt_create(botan_pk_op_decrypt_t* op,
{
BOTAN_ASSERT_NONNULL(op);
+ *op = nullptr;
+
if(flags != 0)
return BOTAN_FFI_ERROR_BAD_FLAG;
@@ -997,6 +1001,8 @@ int botan_pk_op_sign_create(botan_pk_op_sign_t* op,
{
BOTAN_ASSERT_NONNULL(op);
+ *op = nullptr;
+
if(flags != 0)
return BOTAN_FFI_ERROR_BAD_FLAG;
@@ -1086,6 +1092,8 @@ int botan_pk_op_key_agreement_create(botan_pk_op_ka_t* op,
{
BOTAN_ASSERT_NONNULL(op);
+ *op = nullptr;
+
if(flags != 0)
return BOTAN_FFI_ERROR_BAD_FLAG;